home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 4 / The 640 Meg Shareware Studio CD-ROM Volume IV (Data Express)(1994).ISO / clang / rxu15.zip / YDBAUTIL.INF (.txt) < prev   
OS/2 Help File  |  1994-01-12  |  79KB  |  3,042 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About YDBAUTIL ΓòÉΓòÉΓòÉ
  3.  
  4. YDBAUTIL is a package of diverse OS/2 Rexx External Functions. Some functions 
  5. in this package work with features of Extended Services (ES), although you do 
  6. not need to have ES installed to use the non-ES functions. Almost all the 
  7. functions in this package are in use in many of my own programs and are fairly 
  8. well de-bugged.  Please let me know of any problems you encounter in using the 
  9. functions, or of any suggestions for enhancements to existing functions, or 
  10. ideas for new ones. 
  11.  
  12.  
  13.   With the functions in the YDBAUTIL function package, you can make
  14.   use of some of OS/2's most powerful facilities, such as multi-threading,
  15.   processes, sessions, semaphores, shared memory, OS/2 queues, etc.
  16.   Some of these features are not only useful in pure Rexx applications,
  17.   but they allow you to write Rexx programs which can talk to compiled
  18.   programs on their level (i.e. reference memory by address, use
  19.   semaphores, etc.).
  20.  
  21.   Another benefit is the ability to quickly prototype real OS/2 programs
  22.   using real OS/2 APIs so that you can cheaply 'prove' techniques
  23.   before committing them to 'C' code.
  24.  
  25.   The capabilities provided to Rexx programs by this package, in
  26.   conjunction with those provided by other Rexx function packages
  27.   (database access, APPC, etc.) and the base language itself allow
  28.   you to prototype or build Rexx applications with much of the
  29.   functional sophistication (and complexity, unfortunately) of "real"
  30.   OS/2 applications.
  31.  
  32.   In addition to the many OS/2 API "passthrough" functions, there are
  33.   some Rexx-specific enhancements and additions.
  34.  
  35.  
  36.   Author:        Dave Boll
  37.                  (CompuServe = 74170,2016)
  38.                  IBMMAIL(USFMCFKF)
  39.   Release Date:  10 January, 1994
  40.   Version:       1.5
  41.  
  42.  
  43. ΓòÉΓòÉΓòÉ 2. Release Notes ΓòÉΓòÉΓòÉ
  44.  
  45. This release contains fixes for some minor problems and includes a few new 
  46. functions: 
  47.  
  48.   RxOpen          - open a file with full DosOpen() capabilities
  49.   RxGetInfoBlocks - get DosGetInfoBlocks() info
  50.   RxStem2Struct   - map values of a stem into a structure (finally implemented)
  51.   RxQueryAppType  - query application type of an executable file
  52.  
  53.   RxVioPopUp            - Start a VioPopUp display screen
  54.   RxVioEndPopUp         - Close a VioPopUp display screen
  55.   RxVioWrtCharStrAtt    - Write characters to a VioPopUp display screen
  56.   RxKbCharIn            - Get a character from a VioPopUp display screen
  57.   RxDupHandle           - Do a "DosDupHandle()"
  58.   RxSetFHState          - Set file handle state
  59.   RxQueryFHState        - Query file handle state
  60.  
  61. Also, the "RxPstat()" function was reincarnated as "RxQProcStatus()" and is 
  62. documented herein (it now works properly). 
  63.  
  64. In this version (v1.5), "RxQProcStatus()" stores Library and Shared-Memory 
  65. information under the stem differently.  See that section for more information. 
  66.  
  67. This function package is 32-bit code and will only work on OS/2 2.x 
  68.  
  69.  
  70. ΓòÉΓòÉΓòÉ 3. How to Use It ΓòÉΓòÉΓòÉ
  71.  
  72. How to register the functions: 
  73.  
  74. In order to use the functions, you have to register them with Rexx like this:
  75.  
  76.   call rxfuncadd 'rxydbautilinit','ydbautil','rxydbautilinit'
  77.   call rxydbautilinit
  78.  
  79. The .DLL "ydbautil.dll" must be in your libpath.
  80. The program "RXSRS.EXE" must be in your path in order to use the functions
  81. "RxStartRexxSession" and "RxDetachRexxPgm".
  82.  
  83.  
  84. ΓòÉΓòÉΓòÉ 4. Available External Functions ΓòÉΓòÉΓòÉ
  85.  
  86. The available functions are: 
  87.  
  88.  
  89.   Function Package utility functions
  90.   ----------------------------------
  91.   RxYdbaUtilInit        - Register all YDBAUTIL Rexx functions
  92.   RxYdbaUtilTerm        - De-Register all YDBAUTIL Rexx functions
  93.   RxYdbaUtilQuery       - Query available external function entry point names
  94.  
  95.   UPM/Net Related
  96.   -----------
  97.   RxUpm                 - Rexx interface to UPM
  98.   RxNet                 - Rexx interface to certain NET calls
  99.                           (also some UPM-related calls)
  100.  
  101.   System-Info related
  102.   -------------------
  103.   RxProcId              - Get process' own PID and TID information
  104.   RxGetInfoBlocks       - Get information about current process/thread
  105.   RxQueryAppType        - Get information about an executable file
  106.   RxQuerySysInfo        - Invoke DosQuerySysInfo
  107.   RxQProcStatus         - Obtain Process Status Information (like PSTAT)
  108.   RxSetError            - Set DosError settings (enable/disable HardError
  109.                           and Exception popups)
  110.   RxReplaceModule       - Replace an active .DLL or .EXE file
  111.   RxExitList            - Use DosExitList
  112.  
  113.   Rexx programming and debugging functions
  114.   ----------------------------------------
  115.   RxVlist               - List, manipulate Rexx variable pool
  116.   RxScount              - Count strings (needle) in another string (haystack)
  117.   RxPmPrintf            - Write lines to a PMPrintf Monitor
  118.   RxCallInStore         - Execute a string as a program
  119.   RxTokenize            - Tokenize ("Compile") a program string
  120.   RxPullQueue           - Pull items from any Rexx data queue
  121.   RxAddQueue            - Add items to any Rexx data queue
  122.   RxQueued              - Query number of items on any Rexx data queue
  123.   RxQExists             - Query existence of a Rexx Queue
  124.   RxSearchPath          - Find a file in a path
  125.  
  126.   I/O related
  127.   -----------
  128.   RxRsoe2f              - Redirect StdOut/StdErr to a file (by file name)
  129.   RxSoSe2H              - Redirect StdOut/StdErr to a file (by file handle)
  130.   RxSi2H                - Redirect StdIn from a file (by file handle)
  131.   RxRSi2F               - Redirect StdIn from a file (by file name)
  132.   RxOpen                - Open a file (with full DosOpen capabilities)
  133.   RxRead                - Read data from a file handle
  134.   RxWrite               - Write data to a file handle
  135.   RxCloseH              - Close a file handle
  136.   RxExecI               - Read data into a Rexx queue or stem from a file
  137.   RxExecO               - Write data from a Rexx queue or stem to a file
  138.   RxVioPopUp            - Start a VioPopUp display screen
  139.   RxVioEndPopUp         - Close a VioPopUp display screen
  140.   RxVioWrtCharStrAtt    - Write characters to a VioPopUp display screen
  141.   RxKbCharIn            - Get a character from a VioPopUp display screen
  142.   RxDupHandle           - Do a "DosDupHandle()"
  143.   RxSetFHState          - Set file handle state
  144.   RxQueryFHState        - Query file handle state
  145.  
  146.   OS/2 Pipes
  147.   ----------
  148.   RxCreateNPipe         - Create a named pipe
  149.   RxConnectNPipe        - Connect to a named pipe
  150.   RxDisConnectNPipe     - Disconnect from a named pipe
  151.   RxCreatePipe          - Create an un-named pipe
  152.   RxDestroyPipe         - Destroy a pipe
  153.  
  154.   OS/2 Queues
  155.   ----------
  156.   RxCreateQueue         - DosCreateQueue
  157.   RxOpenQueue           - DosOpenQueue
  158.   RxPeekQueue           - DosPeekQueue
  159.   RxReadQueue           - DosReadQueue
  160.   RxWriteQueue          - DosWriteQueue
  161.   RxPurgeQueue          - DosPurgeQueue
  162.   RxQueryQueue          - DosQueryQueue
  163.   RxCloseQueue          - DosCloseQueue
  164.   RxReadQueueStr        - Returns data from de-referenced queue pointer
  165.  
  166.   NetBios information
  167.   -------------------
  168.   RxNbSessionStatus     - Obtain NETBIOS session status information
  169.  
  170.   Tasking, threads, etc.
  171.   ----------------------
  172.   RxSetPriority         - Set the priority of processes or threads
  173.             Process - Related
  174.   RxKillProcess         - Kill an OS/2 process by process-id
  175.   RxExecPgm             - Execute a program using DosExecPgm
  176.   RxStartSession        - Start a program in another session (DosStartSession)
  177.   RxStartRexxSession    - Start a Rexx program in another session
  178.   RxDetachRexxPgm       - Detach a Rexx program
  179.             Thread - Related
  180.   RxCreateRexxThread    - Execute a Rexx program on another thread
  181.   RxCreateThread        - Call a procedure address on another thread
  182.   RxKillThread          - Kill a thread by thread-id
  183.   RxResumeThread        - Resume thread execution by thread-id
  184.   RxSuspendThread       - Suspend thread execution by thread-id
  185.   RxCallEntryPoint      - Call a (non-Rexx) routine by entry point address
  186.  
  187.   OS/2 Memory managment
  188.   ---------------------
  189.   RxStructMap           - Generate a structure map for RxStruct2Stem()
  190.   RxStruct2Stem         - Map structure elements into a stem
  191.   RxStem2Struct         - Map a stem into structure elements
  192.   RxStorage             - Query/Alter storage by address
  193.   RxAdd2Ptr             - Pointer Arithmetic (Add/Subtract)
  194.   RxThunkAddr           - Thunk an address Flat->Segmented, Segmented->Flat
  195.   RxAllocMem            - Allocate Memory
  196.   RxFreeMem             - Free Memory
  197.   RxAllocSharedMem      - Allocated Shared memory (named or un-named)
  198.   RxGetSharedMem        - Get (gettable) shared memory
  199.   RxGiveSharedMem       - Give (giveable) shared memory
  200.   RxGetNamedSharedMem   - Get named shared memory
  201.   RxSetMem              - Set memory attributes
  202.   RxQueryMem            - Query memory attributes
  203.   RxSubAllocMem         - Suballocate memory
  204.   RxSubFreeMem          - Free suballocated memory
  205.   RxSubSetMem           - Set memory for suballocation
  206.   RxSubUnsetMem         - Unset previously "SubSet" memory
  207.  
  208.   OS/2 Semaphores
  209.   ---------------
  210.              Event Semaphore
  211.   RxCreateEventSem      - Create an event semaphore
  212.   RxCloseEventSem       - Close an event semaphore
  213.   RxOpenEventSem        - Open an event semaphore
  214.   RxPostEventSem        - Post an event semaphore
  215.   RxQueryEventSem       - Query an event semaphore
  216.   RxResetEventSem       - Reset an event semaphore
  217.   RxWaitEventSem        - Wait on an event semaphore
  218.              Mutex Semaphore
  219.   RxCreateMutexSem      - Create a Mutex semaphore
  220.   RxOpenMutexSem        - Invoke DosOpenMutexSem
  221.   RxCloseMutexSem       - Invoke DosCloseMutexSem
  222.   RxQueryMutexSem       - Invoke DosQueryMutexSem
  223.   RxReleaseMutexSem     - Invoke DosReleaseMutexSem
  224.   RxRequestMutexSem     - Invoke DosRequestMutexSem
  225.              MuxWait Semaphore
  226.   RxCreateMuxWaitSem    - Invoke DosCreateMuxWaitSem
  227.   RxCloseMuxWaitSem     - Invoke DosCloseMuxWaitSem
  228.   RxOpenMuxWaitSem      - Invoke DosOpenMuxWaitSem
  229.   RxWaitMuxWaitSem      - Invoke DosWaitMuxWaitSem
  230.   RxAddMuxWaitSem       - Invoke DosAddMuxWaitSem
  231.   RxDeleteMuxWaitSem    - Invoke DosDeleteMuxWaitSem
  232.   RxQueryMuxWaitSem     - Invoke DosQueryMuxWaitSem
  233.  
  234.   DLL Handling
  235.   ------------
  236.   RxLoadModule          - Load a DLL
  237.   RxFreeModule          - Free a DLL
  238.   RxQueryModuleName     - Query the fully qualified name of a DLL (by handle)
  239.   RxQueryModuleHandle   - Query the module handle of a DLL (by name)
  240.   RxQueryProcType       - Query the addressing mode of an entry point in a DLL
  241.   RxQueryProcAddr       - Query the procedure address of an entry point in a DLL
  242.  
  243.   Rexx Macro Space Handling
  244.   -------------------------
  245.   RxAddMacro            - Add a particular Macro Space function
  246.   RxDropMacro           - Drop a particular Macro Space function
  247.   RxClearMacroSpace     - Clear the Rexx Macro Space
  248.   RxSaveMacroSpace      - Save a particular Macro Space function to a file
  249.   RxLoadMacroSpace      - Load a particular Macro Space function from a file
  250.   RxQueryMacro          - Query the position of a particular Macro Space function
  251.   RxReorderMacro        - Reorder a function's position in a Macro Space
  252.  
  253.   PM / Wp related functions
  254.   -------------------------
  255.   RxWinQueryObject      - Query object handle of a WP object
  256.   RxWinDestroyObject    - Destroy a WP object
  257.  
  258.  
  259. ΓòÉΓòÉΓòÉ 5. UPM Related Functions ΓòÉΓòÉΓòÉ
  260.  
  261. Functions which allow certain UPM activities to be performed. 
  262.  
  263.  
  264. ΓòÉΓòÉΓòÉ 5.1. RxUpm - Rexx/UPM Interface ΓòÉΓòÉΓòÉ
  265.  
  266. This function allows you to make most UPM calls from a Rexx program. 
  267.  
  268. Syntax:
  269.  
  270.   func  = 'Logon'     For Process level logon, only usable by that process */
  271.           'Logonp'
  272.         = 'Logonu'    For "User" logon, usable by all processes
  273.         = 'Logoff'    For Process level logoff, undoes a "LOGONP"
  274.           'Logoffp'
  275.         = 'Logoffu'   For "User" logoff, undoes a "LOGONU"
  276.         = 'LogonList' Gets list of current active logons
  277.   uid   = 'Userid'    Userid to be logged on/off
  278.         = 'stemname'  Name of Rexx stem variable under which results
  279.                       of "LogonList" are mapped as such:
  280.                       stem.0    - Number of logons reported on
  281.                       stem.n.1  - Userid
  282.                       stem.n.2  - Node/Domain name
  283.                       stem.n.3  - Session-Id
  284.                       stem.n.4  - Logon type (Local/Node/Domain)
  285.   pw    = 'Password'  Password to be used with 'Userid' (for logon)
  286.   type  = 'Local'     Logs you on/off UPM locally (default is LOCAL if
  287.                       no value supplied)
  288.         = 'Node'      Logs you on/off a node
  289.         = 'Domain'    Logs you on/off a LAN domain
  290.         = 'dataBase'  Logs you on/off the correct node for a database
  291.   name  = 'Name'      The name of the node/domain/database, depending on
  292.                       what "TYPE" was chosen
  293.   check = 'Admin'     Checks to see if userid has Admin authority
  294.         = 'User'      Checks to see if userid has User authority
  295.         = 'Config'    Checks to see if logon was done from Config.Sys
  296.  
  297.   upmrc = RxUpm(func, uid, pw, type, name, check)
  298.  
  299.  
  300. ΓòÉΓòÉΓòÉ 5.2. RxNet - Rexx/NET Interface ΓòÉΓòÉΓòÉ
  301.  
  302. This function allows you to make certain NetApi calls from Rexx.  This enables 
  303. you to do such things as changing passwords, adding and deleting userids, 
  304. validating a userid/pw, listing users and logons. 
  305.  
  306. Syntax:
  307.  
  308. /* General syntax */
  309.   netrc = RxNet(func, server, arg3, arg4, arg5, arg6)
  310.  
  311. where:
  312.  
  313.   func   = 'UserPwSet' /* Change a user's password */
  314.          = 'UserAdd'   /* Add a user to UPM */
  315.          = 'UserDel'   /* Delete a user from UPM */
  316.          = 'UserVal'   /* Validate a userid/password without logging on */
  317.          = 'UserEnum'  /* List users in UPM */
  318.          = 'LogonEnum' /* List active logons */
  319.          = 'FileEnum'  /* File usage on the LAN */
  320.          = 'UseAdd'    /* Do a "Net Use dev \\srv\alias" */
  321.          = 'UseDel'    /* Do a "Net Use dev /d" */
  322.          = 'UseEnum'   /* Do a "Net Use" */
  323.   server = name of server, or '00'x for local
  324.   netrc  = return code from NetApi call. If netrc < 2100, then it's probably
  325.            a base OS/2 return code, otherwise, it's defined in NETCONS.H
  326.  
  327. /* Specific calls */
  328.   netrc = RxNet('UserPwSet', server, userid, oldpw, newpw)
  329.  
  330.   netrc = RxNet('UserAdd', server, userid, password, type, comment)
  331.           type = 'User', 'Guest', or 'Admin'
  332.  
  333.   netrc = RxNet('UserDel', server, userid)
  334.  
  335.   netrc = RxNet('UserVal', server, userid, password)
  336.  
  337.   netrc = RxNet('UserEnum',server, rexxstem)
  338.           rexxstem = Rexx stem name, under which results are mapped as:
  339.                      stem.0 = number of users
  340.                      stem.n.1 = userid
  341.                      stem.n.2 = privilege level (Guest, User, Admin, ?)
  342.                      stem.n.3 = password age (in seconds)
  343.                      stem.n.4 = comment
  344.  
  345.   netrc = RxNet('LogonEnum',server, rexxstem)
  346.           rexxstem = Rexx stem name, under which results are mapped as:
  347.                      stem.0 = number of users
  348.                      stem.n.1 = userid
  349.  
  350.   netrc = RxNet('FileEnum',server, basepath, username, rexxstem)
  351.           basepath = file path/name qualifier
  352.           username = username qualifier
  353.           rexxstem = Rexx stem name, under which results are mapped as:
  354.                      stem.0 = number of entries
  355.                      stem.n.1 = file-id
  356.                      stem.n.2 = permissions
  357.                      stem.n.3 = numlocks
  358.                      stem.n.4 = pathname
  359.                      stem.n.5 = username
  360.  
  361.   netrc = RxNet('UseAdd', server, device, name, password)
  362.           device   = Local name for resource, such as a drive letter
  363.           name     = server\alias (must be like "\\servname\alias")
  364.           password = optional password to use resource
  365.  
  366.   netrc = RxNet('UseDel', server, device, forcemode)
  367.           device    = Local name for resource, such as a drive letter
  368.           forcemode = 'F'orce
  369.                       'N'o force
  370.                       'M'ax force
  371.  
  372.   netrc = RxNet('UseEnum',server, rexxstem)
  373.           rexxstem = Rexx stem name, under which results are mapped as:
  374.                      stem.0 = number of entries
  375.                      stem.n.1 = device name
  376.                      stem.n.2 = name
  377.                      stem.n.3 = status, values are:
  378.                                 Ok
  379.                                 Paused
  380.                                 Disconnected/SessionLost
  381.                                 NetError
  382.                                 Connecting
  383.                                 Reconnecting
  384.                                 ?
  385.                      stem.n.4 = asg_type, values are:
  386.                                 WildCard
  387.                                 DiskDevice
  388.                                 SpooledPrinter
  389.                                 SerialDevice
  390.                                 IPC (InterProcessCommunication)
  391.                                 ?
  392.                      stem.n.5 = refcount
  393.                      stem.n.5 = usecount
  394.  
  395.  
  396. ΓòÉΓòÉΓòÉ 6. Rexx Programming/Debugging ΓòÉΓòÉΓòÉ
  397.  
  398. Tools for developing Rexx programs. 
  399.  
  400.  
  401. ΓòÉΓòÉΓòÉ 6.1. RxSCount - Count instances of a string ΓòÉΓòÉΓòÉ
  402.  
  403. This function returns a count of the number of instances of a string "needle" 
  404. in a string "haystack", optionally ignoring case. 
  405.  
  406. Syntax:
  407.  
  408.   numitem = rxscount(needle,haystack[,case])
  409.  
  410. where:
  411.  
  412.   needle   = string you want to count instances of
  413.   haystack = string in which you want to count instances of "needle"
  414.   case     = any character to indicate that case (upper/lower) is to
  415.              be ignored
  416.   numitem  = number of times "needle" is found in "haystack"
  417.  
  418.  
  419. ΓòÉΓòÉΓòÉ 6.2. RxPmPrintf - Write lines to a PMPrintf Monitor ΓòÉΓòÉΓòÉ
  420.  
  421. This function writes data lines to a PMPrintf "Monitor" program. 
  422.  
  423. Syntax:
  424.  
  425.   bytes = RxPmPrintf(qname, [data1 [,data2 [,data3 [...]]]] )
  426.  
  427. where:
  428.  
  429.   qname    = name of PMPrintf queue
  430.              If blank, uses default PMPrintf Queue (PRINTF32).
  431.   data1    = data to be written to PMPrintf
  432.   ...        Each argument is written as a separate line
  433.   datan
  434.  
  435.   bytes    = number of bytes written in this operation
  436.  
  437. Notes:
  438.  
  439.   The PMPrintf tool can be downloaded from the OS/2 Bulletin Board.
  440.   This Rexx function does work with PMPrintf v2.5, but may not work
  441.   with earlier versions.  You can start the PMPrintf program with
  442.   a command line argument specifying an alternate queue name for it
  443.   to use.  This queue name can be supplied as the first argument of
  444.   RxPmPrintf to direct the data to a specific running instance of
  445.   PMPrintf.
  446.  
  447.   If only the queue name is supplied (i.e. args 2-n are not supplied),
  448.   nothing at all is written to queue.  If an argument has zero length,
  449.   no data will be written to the queue for that argument (i.e. you
  450.   must supply at least one byte to be written to queue).
  451.  
  452.  
  453. ΓòÉΓòÉΓòÉ 6.3. RxCallInStore - Execute a string as a program ΓòÉΓòÉΓòÉ
  454.  
  455. This function allows the Rexx program developer to execute a string as though 
  456. it were a Rexx program.  This allows you to build the equivalent of a Rexx 
  457. program's text in a variable, and then execute it from the string.  Actually, 
  458. the Rexx program text can come from anywhere -- a file, over a communications 
  459. link, from a database. For repeated execution of a program, use "RxTokenize" to 
  460. "compile" the program, then call "RxCallInStore" with "&" to re-use the 
  461. tokenized program. 
  462.  
  463. Syntax:
  464.  
  465.   result = RxCallInStore strtext, arg1, arg2, ..., arg19
  466.  
  467. where:
  468.  
  469.   strtext  = text of a Rexx program, complete with crlf and eof markers
  470.                   or
  471.              a '$' immediately preceding a source program string
  472.                   or
  473.              a '&' immediately preceding a tokenized program string
  474.   arg1     = arguments to the called program
  475.   ...
  476.   arg19
  477.  
  478. Note:
  479.  
  480.   Example of executing a program string:
  481.  
  482.     crlf = '0d0a'x
  483.     str = '/* Rexx */'crlf
  484.     str = str 'Do i=1 To Arg()'crlf
  485.     str = str '  Say "Arg#"i "= {"arg(i)"}"'crlf
  486.     str = str 'End'crlf
  487.     str = str||'1a'x       /* EOF marker */
  488.     call rxcallinstore str, date(), time()
  489.                ( or )
  490.     call rxcallinstore '$'str, date(), time()
  491.                ( or )
  492.     tstr = rxtokenize(str)
  493.     call rxcallinstore '&'tstr, date(), time()
  494.  
  495.  
  496. ΓòÉΓòÉΓòÉ 6.4. RxTokenize - Tokenize a program source string ΓòÉΓòÉΓòÉ
  497.  
  498. This function in effect "compiles" a program source string for re-use with 
  499. subsequent "RxCallInstore" or "RxCreateRexxThread" calls. This provides better 
  500. performance when a program string is repeatedly called. 
  501.  
  502. Syntax:
  503.  
  504.   tokenstr = RxTokenize(progstr)
  505.  
  506. where:
  507.  
  508.   progstr  = actual Rexx program source string
  509.   tokenstr = tokenized ("compiled") result of "progstr"
  510.  
  511. Note:
  512.  
  513.   This function, in conjunction with the "RxCallInstore" and/or
  514.   "RxCreateRexxThread" functions, can be used to achieve the same
  515.   effect as the Rexx Macrospace, except that this technique is local
  516.   to the program using it (whereas the Macrospace is system global).
  517.  
  518.  
  519. ΓòÉΓòÉΓòÉ 6.5. RxVlist - Display/Process Rexx Variables ΓòÉΓòÉΓòÉ
  520.  
  521. This function allows the Rexx program developer to view portions of the Rexx 
  522. variable pool.  It also allows you to effectively "pass" variable pools (or 
  523. subsets thereof) between execs across Rexx queues. 
  524.  
  525. Syntax:
  526.  
  527.   numvar = RxVlist( [vnamepat] [,func] [,qname] )
  528.  
  529. where:
  530.  
  531.   func     = 'V'  /* Puts variable name/value pairs on a queue */
  532.            = 'N'  /* Puts variable names on a queue */
  533.            = 'G'  /* Gets variable name/value pairs off a queue */
  534.                   /* and incorporates them into the current variable pool */
  535.            = 'D'  /* display variables and their values (default) */
  536.   vnamepat = variable name prefix (every variable whose name begins with this
  537.              value is processed according to the specified function)
  538.              (default is all variables)
  539.   qname    = name of a Rexx queue to use (default is the current queue)
  540.  
  541.  
  542. ΓòÉΓòÉΓòÉ 6.6. RxPullQueue - Pull items off any Rexx queue ΓòÉΓòÉΓòÉ
  543.  
  544. This function does what the Rexx "Pull" instruction and "LineIn" functions do, 
  545. except this function allows you to specify the queue name as part of the call, 
  546. regardless of what the current queue may be. 
  547.  
  548. Syntax:
  549.  
  550.   data = RxPullQueue( [qname] [,type] [,rexxvar] )
  551.  
  552. where:
  553.  
  554.   qname   = name of Rexx queue to pull from (default is current queue)
  555.   type    = 'Wait' or 'Nowait' (default is 'Wait')
  556.   rexxvar = name of a Rexx variable into which is put the queue-insertion-
  557.             timestamp for the retreived element
  558.   data    = data obtained from queue
  559.  
  560.  
  561. ΓòÉΓòÉΓòÉ 6.7. RxAddQueue - Add items to any Rexx queue ΓòÉΓòÉΓòÉ
  562.  
  563. This function does what the Rexx "Queue" and "Push" instructions, and the 
  564. "LineOut" function do, except this function allows you to specify the queue 
  565. name as part of the call, regardless of what the current queue may be. 
  566.  
  567. Syntax:
  568.  
  569.   qrc = RxAddQueue( data [,qname] [,type] )
  570.  
  571. where:
  572.  
  573.   data  = data to be placed on queue
  574.   qname = name of Rexx queue to add to (default is current queue)
  575.   type  = 'Queue' or 'Push' (default is 'Queue')
  576.  
  577.  
  578. ΓòÉΓòÉΓòÉ 6.8. RxQueued - Query number of items on any Rexx queue ΓòÉΓòÉΓòÉ
  579.  
  580. This function does what the Rexx "Queued" function does, except this function 
  581. allows you to specify the queue name as part of the call, regardless of what 
  582. the current queue may be. 
  583.  
  584. Syntax:
  585.  
  586.   numq = RxQueued( [qname] )
  587.  
  588. where:
  589.  
  590.   qname = name of Rexx queue to report on (default is current queue)
  591.  
  592.  
  593. ΓòÉΓòÉΓòÉ 6.9. RxQExists - Query existence of a Rexx Queue ΓòÉΓòÉΓòÉ
  594.  
  595. This function returns "1" or "0", indicating the existence of the Rexx Queue 
  596. whose name you supply as an argument. 
  597.  
  598. Syntax:
  599.  
  600.   bool = RxQExists( [qname] )
  601.  
  602. where:
  603.  
  604.   qname = name of Rexx queue to check for existence of
  605.   bool  = truth value of queue's existence
  606.  
  607.  
  608. ΓòÉΓòÉΓòÉ 6.10. RxSearchPath - Find a file in a path ΓòÉΓòÉΓòÉ
  609.  
  610. This function does what REXXUTIL's "SysSearchPath" does, but allows full use of 
  611. DosSearchPath capabilities. 
  612.  
  613. Syntax:
  614.  
  615.   info = RxSearchPath(fname,path[,flags])
  616.  
  617. where:
  618.  
  619.   fname = name of file to search for (can contain pattern characters)
  620.   path  = either an actual path string, or the name of an environment
  621.           variable containing a path string
  622.   flags = any combination of:
  623.           V - indicates that "path" is an environment variable name,
  624.               rather than an actual path string
  625.           I - ignore network errors when searching through network
  626.               drives
  627.           C - search current directory first
  628.           The default is "Not V, Not I, Not C".
  629.   info  = two blank delimited tokens:
  630.           1) return code from DosSearchPath
  631.           2) If (1) is zero, the fully qualified name of the file found
  632.  
  633.  
  634. ΓòÉΓòÉΓòÉ 7. Memory Management/Access ΓòÉΓòÉΓòÉ
  635.  
  636. These functions allow Rexx programs to create, access, and manage OS/2 memory 
  637. objects by address.  This includes objects such as shared memory (named and 
  638. un-named). 
  639.  
  640.  
  641. ΓòÉΓòÉΓòÉ 7.1. RxStructMap - Generate a structure map for RxStruct2Stem() ΓòÉΓòÉΓòÉ
  642.  
  643. This function builds a "structure map" which can be used by the function 
  644. RxStruct2Stem() to map the elements of a structure into a Rexx stem.  The 
  645. elements of the structure must be described by the Rexx program.  This can be 
  646. used to access the elements of a structure whose address is passed to the Rexx 
  647. program by a compiled program. 
  648.  
  649. Syntax:
  650.  
  651.   map = RxStructMap(stemname)
  652.  
  653. where
  654.  
  655.   stemname = name of Rexx stem under which structure is described as such:
  656.  
  657.              stem.0   = Number of elements in structure (1-n)
  658.              stem.P   = Packing mode of structure (default = 1)
  659.              stem.n.T = Type of element "n" in structure.  Valid
  660.                         values are:
  661.                         l = signed long integer    (4 bytes)
  662.                         L = unsigned long integer  (4 bytes)
  663.                         s = signed short integer   (2 bytes)
  664.                         S = unsigned short integer (2 bytes)
  665.                         d = double                 (8 bytes)
  666.                         D = double                 (8 bytes)
  667.                         c = character array        (stem.n.L bytes)
  668.                         C = character array        (stem.n.L bytes)
  669.              stem.n.L = Length of character array (if type = 'C'
  670.                         or 'c')
  671.  
  672.   map      = binary structure map used by RxStruct2Stem()
  673.  
  674.  
  675. ΓòÉΓòÉΓòÉ 7.2. RxStruct2Stem - Map structure elements into a stem ΓòÉΓòÉΓòÉ
  676.  
  677. This function allows a Rexx program to map the elements of a structure into a 
  678. Rexx stem.  The structure is referred to by its address.  The structure is 
  679. described by the map built with RxStructMap().  This can be used to access the 
  680. elements of a structure whose address is passed to the Rexx program by a 
  681. compiled program. 
  682.  
  683. Syntax:
  684.  
  685.   bytes = RxStruct2Stem(stemname, pointer, map)
  686.  
  687. where
  688.  
  689.   stemname = name of Rexx stem under which structure elements' values
  690.              are returned, as such:
  691.  
  692.              stem.0   = Number of elements in structure
  693.              stem.n   = Actual value of element "n" in structure
  694.  
  695.   pointer  = 32-bit pointer (address) to base of structure
  696.   map      = structure map generated by RxStructMap()
  697.   bytes    = total number of bytes in structure
  698.  
  699.  
  700. ΓòÉΓòÉΓòÉ 7.3. RxStem2Struct - Map a stem into structure elements ΓòÉΓòÉΓòÉ
  701.  
  702. This function allows a Rexx program to map a stem variable into the elements of 
  703. a structure.  The structure is referred to by its address. 
  704.  
  705.  
  706. Syntax:
  707.  
  708.   bytes = RxStem2Struct(stemname, pointer, map)
  709.  
  710. where
  711.  
  712.   stemname = name of Rexx stem under which structure elements' values
  713.              are provided, as such:
  714.  
  715.              stem.n   = Actual value of element "n" in structure
  716.  
  717.   pointer  = 32-bit pointer (address) to base of structure
  718.   map      = structure map generated by RxStructMap()
  719.   bytes    = total number of bytes in structure
  720.  
  721.  
  722. ΓòÉΓòÉΓòÉ 7.4. RxStorage - Access/Alter memory by address ΓòÉΓòÉΓòÉ
  723.  
  724. This function allows a Rexx program to access and/or alter storage by address. 
  725. This could be used to process data passed to it by a program.  This could also 
  726. be used to "Pass By Reference" among Rexx programs when using the RxAllocMem 
  727. and RxFreeMem functions. 
  728.  
  729. Syntax:
  730.  
  731.   outdata = RxStorage( pointer [, length] [, indata] )
  732.  
  733. where
  734.  
  735.   pointer  = 32-bit pointer (address)
  736.   length   = Length of storage to be queried (defaults to 1)
  737.   indata   = Data to place at address "pointer" for the length of the data
  738.              (regardless of "length" value)
  739.   outdata  = Data at address "pointer" for length "length" (truncated if
  740.              "length" takes you beyond allowed storage)
  741.  
  742. Note:
  743.  
  744.   A request to query memory out-of-bounds returns a string up to the bound-
  745.   ary.  A request to set memory out-of-bounds, sets memory up to the bound-
  746.   ary.  All memory is allocated in 4k chunks.  Therefore, some query or set
  747.   operations will access memory up to the next 4k boundary.
  748.  
  749.  
  750. ΓòÉΓòÉΓòÉ 7.5. RxAdd2Ptr - Pointer Arithmetic (Add/Subtract) ΓòÉΓòÉΓòÉ
  751.  
  752. This function allows a Rexx program to add or subtract from an OS/2 32-bit 
  753. linear address. 
  754.  
  755. Syntax:
  756.  
  757.   newptr = RxAdd2Ptr( pointer , [number] )
  758.  
  759. where:
  760.  
  761.   pointer  = 32-bit pointer (address)
  762.   number   = amount by which "pointer" is to be incremented/decremented
  763.              in bytes.  Default is zero.
  764.   newptr   = result of addition/subtraction
  765.  
  766.  
  767. ΓòÉΓòÉΓòÉ 7.6. RxThunkAddr - Thunk an address Flat->Segmented, Segmented->Flat ΓòÉΓòÉΓòÉ
  768.  
  769. This function allows a Rexx program to "thunk" an address from flat to 
  770. segmented, or from segmented to flat (i.e. 32->16 bit or 16->32 bit). 
  771.  
  772. Syntax:
  773.  
  774.   newptr = RxThunkAddr( pointer , type )
  775.  
  776. where:
  777.  
  778.   pointer  = input address
  779.   type     = indicates what to convert input address to:
  780.              S - convert input address from flat to segmented (32->16)
  781.              F - convert input address from segmented to flat (16->32)
  782.   newptr   = thunked address
  783.  
  784.  
  785. ΓòÉΓòÉΓòÉ 7.7. RxAllocMem - Allocate memory (using DosAllocMem) ΓòÉΓòÉΓòÉ
  786.  
  787. This function allows a Rexx program to allocate memory.  This memory can then 
  788. be accessed using RxStorage. 
  789.  
  790. Syntax:
  791.  
  792.   allocrc = RxAllocMem(rexxvar, length, flags)
  793.  
  794. where
  795.  
  796.   rexxvar = name of a rexx variable in which pointer is returned
  797.   length  = a decimal integer indicating amount of storage (in bytes) to
  798.             allocate
  799.   flags   = any combination of:
  800.             C - Pag_Commit
  801.             T - Obj_Tile
  802.             X - Pag_Execute
  803.             R - Pag_Read
  804.             W - Pag_Write
  805.             G - Pag_Guard
  806.   allocrc = return code from DosAllocMem()
  807.  
  808. for example:
  809.             /* Following would get 4k committed read/write */
  810.   allocrc = RxAllocMem('pointer', 4096, 'crw')
  811.  
  812. Note:
  813.  
  814.   All memory is allocated in 4k chunks.  Therefore, even if you allocate 200
  815.   bytes, you will get access to 4096 bytes.
  816.  
  817.  
  818. ΓòÉΓòÉΓòÉ 7.8. RxFreeMem - Free memory allocated by RxAllocMem ΓòÉΓòÉΓòÉ
  819.  
  820. This function allows a Rexx program to free memory allocated by RxAllocMem. 
  821.  
  822. Syntax:
  823.  
  824.   freerc = RxFreeMem(pointer)
  825.  
  826. where
  827.  
  828.   pointer - A valid 32 bit pointer.
  829.  
  830. Note:
  831.  
  832.   Returned value is return code from DosFreeMem
  833.  
  834.  
  835. ΓòÉΓòÉΓòÉ 7.9. RxAllocSharedMem - Allocate shared memory ΓòÉΓòÉΓòÉ
  836.  
  837. This function allocates shared (named or un-named) memory.  Other processes can 
  838. access this memory with either RxGetSharedMem (un-named), or 
  839. RxGetNamedSharedMem (named), or if it is "Given", followed by calls to 
  840. RxStorage. 
  841.  
  842. Syntax:
  843.  
  844.   allocrc = RxAllocSharedMem(rexxvar, length, flags [,memname] )
  845.  
  846. where
  847.  
  848.   rexxvar = name of a rexx variable in which pointer is returned
  849.   length  = a decimal integer indicating amount of storage (in bytes) to
  850.             allocate
  851.   flags   = any combination of:
  852.             C - Pag_Commit
  853.             T - Obj_Tile
  854.             I - Obj_Giveable
  855.             E - Obj_Gettable (sic)
  856.             X - Pag_Execute
  857.             R - Pag_Read
  858.             W - Pag_Write
  859.             G - Pag_Guard
  860.   memname = name of shared memory object, if this is to be named shared
  861.             memory
  862.   allocrc = return code from DosAllocSharedMem()
  863.  
  864. for example:
  865.  
  866.   /* To allocate an un-named, gettable object */
  867.   allocrc = RxAllocSharedMem('pointer', 4096, 'cerw')
  868.  
  869.   /* To allocate a named object */
  870.   allocrc = RxAllocSharedMem('pointer', 4096, 'crw','\SHAREMEM\TEST.MEM')
  871.  
  872. Note:
  873.  
  874.   All memory is allocated in 4k chunks.  Therefore, even if you allocate 200
  875.   bytes, you will get access to 4096 bytes.
  876.  
  877.  
  878. ΓòÉΓòÉΓòÉ 7.10. RxGiveSharedMem - Give access to shared memory ΓòÉΓòÉΓòÉ
  879.  
  880. This function gives access to shared, un-named memory to a process-id 
  881.  
  882. Syntax:
  883.  
  884.   giverc = RxGiveSharedMem(pointer, pid [,flags])
  885.  
  886. where
  887.  
  888.   pointer = valid 32-bit pointer
  889.   pid     = valid process-id (as a decimal integer)
  890.   flags   = any combination of:
  891.             X - Pag_Execute
  892.             R - Pag_Read
  893.             W - Pag_Write
  894.             G - Pag_Guard
  895.  
  896. for example:
  897.  
  898.   /* To give shared memory */
  899.   giverc = RxGiveSharedMem(pointer, 23, 'rw')
  900.  
  901. Note:
  902.  
  903.   A valid pointer must be supplied.  This is obtained from the process which
  904.   allocated the shared un-named memory via RxAllocSharedMem.  The process-id
  905.   supplied must be valid (i.e. must currently exist).
  906.  
  907.  
  908. ΓòÉΓòÉΓòÉ 7.11. RxGetSharedMem - Get access to shared memory ΓòÉΓòÉΓòÉ
  909.  
  910. This function gets access to shared, un-named, gettable memory. 
  911.  
  912. Syntax:
  913.  
  914.   getrc = RxGetSharedMem(pointer, flags)
  915.  
  916. where
  917.  
  918.   pointer = valid 32-bit pointer
  919.   flags   = any combination of:
  920.             X - Pag_Execute
  921.             R - Pag_Read
  922.             W - Pag_Write
  923.             G - Pag_Guard
  924.  
  925. for example:
  926.  
  927.   /* To get shared memory */
  928.   getrc = RxGetSharedMem(pointer, 'rw')
  929.  
  930. Note:
  931.  
  932.   A valid pointer must be supplied.  This is obtained from the process which
  933.   allocated the shared un-named memory via RxAllocSharedMem.
  934.  
  935.  
  936. ΓòÉΓòÉΓòÉ 7.12. RxGetNamedSharedMem - Get access to named shared memory ΓòÉΓòÉΓòÉ
  937.  
  938. This function gets access to shared, named memory. 
  939.  
  940. Syntax:
  941.  
  942.   getrc = RxGetNamedSharedMem(rexxvar, memname, flags)
  943.  
  944. where
  945.  
  946.   rexxvar = name of a rexx variable in which pointer is returned
  947.   memname = valid name of a shared memory object
  948.   flags   = any combination of:
  949.             X - Pag_Execute
  950.             R - Pag_Read
  951.             W - Pag_Write
  952.             G - Pag_Guard
  953.   getrc   = return code from DosGetNamedSharedMem()
  954.  
  955. for example:
  956.  
  957.   /* To get named shared memory */
  958.   getrc = RxGetNamedSharedMem('pointer', '\SHAREMEM\TEST.MEM', 'rw')
  959.  
  960.  
  961. ΓòÉΓòÉΓòÉ 7.13. RxSetMem - Set memory attributes ΓòÉΓòÉΓòÉ
  962.  
  963. This function sets memory attributes using DosSetMem 
  964.  
  965. Syntax:
  966.  
  967.   setrc = RxSetMem(pointer [,memsize [,flags]])
  968.  
  969. where
  970.  
  971.   pointer = valid 32-bit pointer
  972.   memsize = size of memory block to set
  973.   flags   = any combination of:
  974.             C - Pag_Commit
  975.             D - Pag_Decommit
  976.             F - Pag_Default
  977.             X - Pag_Execute
  978.             R - Pag_Read
  979.             W - Pag_Write
  980.             G - Pag_Guard
  981.  
  982. for example:
  983.  
  984.   /* To set memory attributes */
  985.   setrc = RxSetMem(pointer, 4096, 'crw')
  986.  
  987. Note:
  988.  
  989.   Returned value is return code from DosSetMem.
  990.  
  991.  
  992. ΓòÉΓòÉΓòÉ 7.14. RxQueryMem - Query memory attributes ΓòÉΓòÉΓòÉ
  993.  
  994. This function queries memory attributes using DosQueryMem 
  995.  
  996. Syntax:
  997.  
  998.   qinfo = RxQueryMem(pointer [,memsize])
  999.  
  1000. where
  1001.  
  1002.   pointer = valid 32-bit pointer
  1003.   memsize = size of memory block to query
  1004.   qinfo   = either one or three blank-delimited tokens:
  1005.             1) return code from DosQueryMem
  1006.                If #1 is zero:
  1007.                  2) actual memory size
  1008.                  3) memory attribute flags, which can be any combination of:
  1009.                     C - Pag_Commit
  1010.                     F - Pag_Free
  1011.                     S - Pag_Shared
  1012.                     B - Pag_Base
  1013.                     X - Pag_Execute
  1014.                     R - Pag_Read
  1015.                     W - Pag_Write
  1016.                     G - Pag_Guard
  1017.  
  1018. for example:
  1019.  
  1020.   /* To query memory attributes */
  1021.   qinfo = RxQueryMem(pointer, 4096)
  1022.   /* "Say qinfo" might say -> "0 4096 CSRW" for instance */
  1023.  
  1024. Note:
  1025.  
  1026.   If first token is not zero, no other information was returned.
  1027.  
  1028.  
  1029. ΓòÉΓòÉΓòÉ 7.15. RxSubSetMem - Set memory for suballocation ΓòÉΓòÉΓòÉ
  1030.  
  1031. This function sets memory for suballocation using DosSubSetMem 
  1032.  
  1033. Syntax:
  1034.  
  1035.   subsetrc = RxSubSetMem(pointer [,memsize [,flags]])
  1036.  
  1037. where
  1038.  
  1039.   pointer = valid 32-bit pointer to pool
  1040.   memsize = size of memory block to subset
  1041.   flags   = any combination of:
  1042.             I - DosSub_Init
  1043.             G - DosSub_Grow
  1044.             S - DosSub_Sparse
  1045.             R - DosSub_Serialize
  1046.  
  1047. for example:
  1048.  
  1049.   /* To subset some memory */
  1050.   subsetrc = RxSubSetMem(pointer, 4096, 'i')
  1051.  
  1052. Note:
  1053.  
  1054.   Returned value is return code from DosSubSetMem.
  1055.  
  1056.  
  1057. ΓòÉΓòÉΓòÉ 7.16. RxSubUnSetMem - UnSet memory from suballocation ΓòÉΓòÉΓòÉ
  1058.  
  1059. This function unsets memory from suballocation using DosSubUnSetMem 
  1060.  
  1061. Syntax:
  1062.  
  1063.   subunsetrc = RxSubUnSetMem(pointer)
  1064.  
  1065. where
  1066.  
  1067.   pointer = valid 32-bit pointer to pool
  1068.  
  1069. for example:
  1070.  
  1071.   /* To subunset some memory */
  1072.   subunsetrc = RxSubUnSetMem(pointer)
  1073.  
  1074. Note:
  1075.  
  1076.   Returned value is return code from DosSubUnSetMem.
  1077.  
  1078.  
  1079. ΓòÉΓòÉΓòÉ 7.17. RxSubAllocMem - Suballocate memory ΓòÉΓòÉΓòÉ
  1080.  
  1081. This function suballocates memory. 
  1082.  
  1083. Syntax:
  1084.  
  1085.   subarc = RxSubAllocMem(rexxvar, pointer [,memsize])
  1086.  
  1087. where
  1088.  
  1089.   rexxvar = name of a rexx variable in which block offset is returned
  1090.   pointer = valid 32-bit pointer to pool
  1091.   memsize = size of block to suballocate
  1092.   subarc  = return code from DosSubAllocMem()
  1093.  
  1094. for example:
  1095.  
  1096.   /* To suballocate some memory */
  1097.   subarc = RxSubAllocMem('block_offset', pointer, 4096)
  1098.  
  1099.  
  1100. ΓòÉΓòÉΓòÉ 7.18. RxSubFreeMem - Free suballocated memory ΓòÉΓòÉΓòÉ
  1101.  
  1102. This function frees suballocated memory. 
  1103.  
  1104. Syntax:
  1105.  
  1106.   freerc = RxSubFreeMem(pointer, boffset [,memsize])
  1107.  
  1108. where
  1109.  
  1110.   pointer = valid 32-bit pointer to pool
  1111.   boffset = block offset pointer
  1112.   memsize = size of block to free
  1113.  
  1114. for example:
  1115.  
  1116.   /* To free suballocated memory */
  1117.   freerc = RxSubFreeMem(pointer, boffset, 4096)
  1118.  
  1119. Note:
  1120.  
  1121.   Returned value is return code from DosSubFreeMem.
  1122.  
  1123.  
  1124. ΓòÉΓòÉΓòÉ 8. Sempahore handling ΓòÉΓòÉΓòÉ
  1125.  
  1126. These functions allow Rexx programs to make use of OS/2 semaphores for 
  1127. synchronization/serialization purposes. 
  1128.  
  1129.  
  1130. ΓòÉΓòÉΓòÉ 8.1. RxCreateEventSem - Create an event semaphore ΓòÉΓòÉΓòÉ
  1131.  
  1132. This function creates a (named or un-named) event semaphore. 
  1133.  
  1134. Syntax:
  1135.  
  1136.   semrc = RxCreateEventSem(rexxvar [,type] [,name] [,state] )
  1137.  
  1138. where
  1139.  
  1140.   rexxvar = name of a rexx variable in which sem handle is returned
  1141.   type    = 'Shared' or 'Private' (default is Private)
  1142.   name    = semaphore name (default is un-named)
  1143.   state   = 'Reset' or 'Posted' (default is Reset)
  1144.   semrc   = return code from DosCreateEventSem()
  1145.  
  1146.  
  1147. ΓòÉΓòÉΓòÉ 8.2. RxOpenEventSem - Open an event semaphore ΓòÉΓòÉΓòÉ
  1148.  
  1149. This function opens an event semaphore for use by a process that did not create 
  1150. the semaphore. 
  1151.  
  1152. Syntax:
  1153.  
  1154.   semrc = RxOpenEventSem(rexxvar, semid)
  1155.  
  1156. where
  1157.  
  1158.   rexxvar = name of a rexx variable in which sem handle is returned
  1159.   semid   = either a semaphore handle, or a semaphore name
  1160.   semrc   = return code from DosOpenEventSem()
  1161.  
  1162. Note:
  1163.  
  1164.   A zero length string is returned if DosOpenEventSem fails.
  1165.  
  1166.  
  1167. ΓòÉΓòÉΓòÉ 8.3. RxPostEventSem - Post an event semaphore ΓòÉΓòÉΓòÉ
  1168.  
  1169. This function posts an event semaphore. 
  1170.  
  1171. Syntax:
  1172.  
  1173.   postrc = RxPostEventSem(hev)
  1174.  
  1175. where
  1176.  
  1177.   hev    = semaphore handle
  1178.   postrc = return code from DosPostEventSem
  1179.  
  1180.  
  1181. ΓòÉΓòÉΓòÉ 8.4. RxQueryEventSem - Query an event semaphore ΓòÉΓòÉΓòÉ
  1182.  
  1183. This function returns the post count for an event semaphore. 
  1184.  
  1185. Syntax:
  1186.  
  1187.   info = RxQueryEventSem(hev)
  1188.  
  1189. where
  1190.  
  1191.   hev    = semaphore handle
  1192.   info   = return code from DosQueryEventSem, followed by number of posts
  1193. Note:
  1194.  
  1195.   Word 1 of info is the return code from DosQueryEventSem
  1196.   Word 2 of info is the actual number of posts to the semaphore
  1197.  
  1198.  
  1199. ΓòÉΓòÉΓòÉ 8.5. RxResetEventSem - Reset an event semaphore ΓòÉΓòÉΓòÉ
  1200.  
  1201. This function resets an event semaphore, returning the number of postings for 
  1202. that semaphore. 
  1203.  
  1204. Syntax:
  1205.  
  1206.   info = RxResetEventSem(hev)
  1207.  
  1208. where
  1209.  
  1210.   hev    = semaphore handle
  1211.   info   = return code from DosResetEventSem, followed by number of posts
  1212.  
  1213. Note:
  1214.  
  1215.   Word 1 of info is the return code from DosResetEventSem
  1216.   Word 2 of info is the actual number of posts to the semaphore before
  1217.                     the Reset.
  1218.  
  1219.  
  1220. ΓòÉΓòÉΓòÉ 8.6. RxWaitEventSem - Wait on an event semaphore ΓòÉΓòÉΓòÉ
  1221.  
  1222. This function waits on the posting of an event semaphore. 
  1223.  
  1224. Syntax:
  1225.  
  1226.   semhandle /* A valid semaphore handle */
  1227.   time = 1000   /* in milliseconds */
  1228.  
  1229.   waitrc = RxWaitEventSem(hev [,time])
  1230.  
  1231. where
  1232.  
  1233.   hev    = semaphore handle
  1234.   time   = number of miliseconds to wait before returning, or the word
  1235.            'Indefinite'.  Default is 'Indefinite'.
  1236.   waitrc = return code from DosWaitEventSem
  1237.  
  1238.  
  1239. ΓòÉΓòÉΓòÉ 8.7. RxCloseEventSem - Close an event semaphore ΓòÉΓòÉΓòÉ
  1240.  
  1241. This function closes an event semaphore 
  1242.  
  1243. Syntax:
  1244.  
  1245.   closerc = RxCloseEventSem(hev)
  1246.  
  1247. where
  1248.  
  1249.   hev     = semaphore handle
  1250.   closerc = return code from DosCloseEventSem
  1251.  
  1252.  
  1253. ΓòÉΓòÉΓòÉ 8.8. RxCreateMutexSem - Create a Mutex Semaphore ΓòÉΓòÉΓòÉ
  1254.  
  1255. This function creates a mutex semaphore 
  1256.  
  1257. Syntax:
  1258.  
  1259.   semrc = RxCreateMutexSem(rexxvar [,type] [,name] [,state] )
  1260.  
  1261. where
  1262.  
  1263.   rexxvar = name of a rexx variable in which sem handle is returned
  1264.   type    = 'Shared' or 'Private' (default is 'Private')
  1265.   name    = semaphore name (default is un-named)
  1266.   state   = 'Owned' or 'Unowned' (default is un-owned)
  1267.   semrc   = return code from DosCreateMutexSem()
  1268.  
  1269.  
  1270. ΓòÉΓòÉΓòÉ 8.9. RxOpenMutexSem - Open a Mutex Semaphore ΓòÉΓòÉΓòÉ
  1271.  
  1272. This function opens a mutex semaphore 
  1273.  
  1274. Syntax:
  1275.  
  1276.   semrc = RxOpenMutexSem(rexxvar, semid )
  1277.  
  1278. where
  1279.  
  1280.   rexxvar = name of a rexx variable in which sem handle is returned
  1281.   semid   = either a semaphore name, or an existing mutex semaphore handle
  1282.   semrc   = return code from DosOpenMutexSem()
  1283.  
  1284.  
  1285. ΓòÉΓòÉΓòÉ 8.10. RxCloseMutexSem - Close a Mutex Semaphore ΓòÉΓòÉΓòÉ
  1286.  
  1287. This function closes a mutex semaphore 
  1288.  
  1289. Syntax:
  1290.  
  1291.   mtxrc = RxCloseMutexSem( hmtx )
  1292.  
  1293. where
  1294.  
  1295.   hmtx  = existing mutex semaphore handle
  1296.   mtxrc = return code from DosCloseMutexSem
  1297.  
  1298.  
  1299. ΓòÉΓòÉΓòÉ 8.11. RxQueryMutexSem - Query Mutex Semaphore ΓòÉΓòÉΓòÉ
  1300.  
  1301. This function queries a mutex semaphore's attributes 
  1302.  
  1303. Syntax:
  1304.  
  1305.   mtxinfo = RxQueryMutexSem( hmtx )
  1306.  
  1307. where
  1308.  
  1309.   hmtx    = existing mutex semaphore handle
  1310.   mtxinfo = four blank delimited tokens:
  1311.             1) return code from DosQueryMutexSem
  1312.             2) Process-Id of semaphore's current owner
  1313.             3) Thread-Id of semaphore's current owner
  1314.             4) A count of the number of calls to DosRequestMutexSem,
  1315.                minus the number of calls to DosReleaseMutexSem, that have
  1316.                been made for the semaphore by the owning thread.
  1317.                If the semaphore is unowned, this value will be zero.
  1318.                If the owning thread has ended, the value will be the
  1319.                request count for the ended owner.
  1320.  
  1321.  
  1322. ΓòÉΓòÉΓòÉ 8.12. RxReleaseMutexSem - Release Mutex Semaphore ΓòÉΓòÉΓòÉ
  1323.  
  1324. This function releases a mutex semaphore 
  1325.  
  1326. Syntax:
  1327.  
  1328.   mtxrc = RxReleaseMutexSem( hmtx )
  1329.  
  1330. where
  1331.  
  1332.   hmtx  = existing mutex semaphore handle
  1333.   mtxrc = return code from DosReleaseMutexSem
  1334.  
  1335.  
  1336. ΓòÉΓòÉΓòÉ 8.13. RxRequestMutexSem - Request Mutex Semaphore ΓòÉΓòÉΓòÉ
  1337.  
  1338. This function requests a mutex semaphore 
  1339.  
  1340. Syntax:
  1341.  
  1342.   mtxrc = RxRequestMutexSem( hmtx [, timeout] )
  1343.  
  1344. where
  1345.  
  1346.   hmtx    = existing mutex semaphore handle
  1347.   timeout = either a decimal integer (miliseconds to block), or the word
  1348.             'Indefinite'
  1349.   mtxrc   = return code from DosRequestMutexSem
  1350.  
  1351.  
  1352. ΓòÉΓòÉΓòÉ 8.14. RxCreateMuxWaitSem - Create a MuxWait Semaphore ΓòÉΓòÉΓòÉ
  1353.  
  1354. This function creates a muxwait semaphore 
  1355.  
  1356. Syntax:
  1357.  
  1358.   semrc = RxCreateMuxWaitSem(rexxvar, stemname [,type] [,anyall]
  1359.                              [,name] )
  1360.  
  1361. where
  1362.  
  1363.   rexxvar  = name of a rexx variable in which sem handle is returned
  1364.   stemname = a Rexx stem name (ending in a period '.'), under which are
  1365.              supplied the semaphore handles which constitute this muxwait
  1366.              semaphore.  The expected structure of the stem is:
  1367.              1) stem.0   = a decimal integer indicating how many semaphores
  1368.                            are supplied
  1369.              2) stem.n.1 = handle of Nth semaphore
  1370.              3) stem.n.2 = decimal integer used as an Id for Nth semaphore
  1371.   type     = 'Shared' or 'Private' (default is 'Private')
  1372.   anyall   = 'anY' or 'alL' (default is 'All')
  1373.   name     = semaphore name (default is un-named)
  1374.   semrc    = return code from DosCreateMuxWaitSem()
  1375.  
  1376.  
  1377. ΓòÉΓòÉΓòÉ 8.15. RxOpenMuxWaitSem - Open a MuxWait Semaphore ΓòÉΓòÉΓòÉ
  1378.  
  1379. This function opens a muxwait semaphore 
  1380.  
  1381. Syntax:
  1382.  
  1383.   semrc = RxOpenMuxWaitSem(rexxvar, semid )
  1384.  
  1385. where
  1386.  
  1387.   rexxvar = name of a rexx variable in which sem handle is returned
  1388.   semid   = either a semaphore name, or an existing muxwait
  1389.             semaphore handle
  1390.   semrc   = return code from DosOpenMuxWaitSem()
  1391.  
  1392.  
  1393. ΓòÉΓòÉΓòÉ 8.16. RxCloseMuxWaitSem - Close a MuxWait Semaphore ΓòÉΓòÉΓòÉ
  1394.  
  1395. This function closes a muxwait semaphore 
  1396.  
  1397. Syntax:
  1398.  
  1399.   muxrc = RxCloseMuxWaitSem( hmux )
  1400.  
  1401. where
  1402.  
  1403.   hmux  = existing muxwait semaphore handle
  1404.   muxrc = return code from DosCloseMuxWaitSem
  1405.  
  1406.  
  1407. ΓòÉΓòÉΓòÉ 8.17. RxDeleteMuxWaitSem - Delete from a MuxWait Semaphore ΓòÉΓòÉΓòÉ
  1408.  
  1409. This function deletes a semaphore from a muxwait semaphore list 
  1410.  
  1411. Syntax:
  1412.  
  1413.   muxrc = RxDeleteMuxWaitSem( hmux, hsem )
  1414.  
  1415. where
  1416.  
  1417.   hmux  = existing muxwait semaphore handle
  1418.   hsem  = handle of a semaphore in the muxwait semaphore list
  1419.   muxrc = return code from DosDeleteMuxWaitSem
  1420.  
  1421.  
  1422. ΓòÉΓòÉΓòÉ 8.18. RxAddMuxWaitSem - Add to a MuxWait Semaphore ΓòÉΓòÉΓòÉ
  1423.  
  1424. This function adds a semaphore to a muxwait semaphore list 
  1425.  
  1426. Syntax:
  1427.  
  1428.   muxrc = RxAddMuxWaitSem( hmux, hsem, semid )
  1429.  
  1430. where
  1431.  
  1432.   hmux  = existing muxwait semaphore handle
  1433.   hsem  = handle of a semaphore to add to the muxwait semaphore list
  1434.   semid = decimal integer used as an Id for this semaphore
  1435.   muxrc = return code from DosAddMuxWaitSem
  1436.  
  1437.  
  1438. ΓòÉΓòÉΓòÉ 8.19. RxQueryMuxWaitSem - Query a MuxWait Semaphore ΓòÉΓòÉΓòÉ
  1439.  
  1440. This function queries information about a muxwait semaphore 
  1441.  
  1442. Syntax:
  1443.  
  1444.   muxinfo = RxQueryMuxWaitSem( hmux, stemname )
  1445.  
  1446. where
  1447.  
  1448.   hmux     = existing muxwait semaphore handle
  1449.   stemname = a Rexx stem name (ending in a period '.'), under which is
  1450.              returned information about the muxwait semaphore.  The structure
  1451.              of the returned information is:
  1452.              1) stem.0   = a decimal integer indicating how many semaphores
  1453.                            are listed in this muxwait semaphore
  1454.              2) stem.n.1 = handle of Nth semaphore
  1455.              3) stem.n.2 = decimal integer Id of Nth semaphore
  1456.   muxinfo  = Two blank delimited tokens:
  1457.              1) return code from DosQueryMuxWaitSem
  1458.              2) a string of letters indicating this muxwait semaphore's
  1459.                 properties:
  1460.                 'S' if it's shared
  1461.                 'Y' if it's a wait ANY
  1462.                 'L' if it's a wait ALL
  1463.  
  1464.  
  1465. ΓòÉΓòÉΓòÉ 8.20. RxWaitMuxWaitSem - Wait on a MuxWait Semaphore ΓòÉΓòÉΓòÉ
  1466.  
  1467. This function waits on a muxwait semaphore 
  1468.  
  1469. Syntax:
  1470.  
  1471.   muxinfo = RxWaitMuxWaitSem( hmux [,timeout] )
  1472.  
  1473. where
  1474.  
  1475.   hmux     = existing muxwait semaphore handle
  1476.   timeout  = either a decimal integer (miliseconds to block), or the word
  1477.             'Indefinite'
  1478.   muxinfo  = Two blank delimited tokens:
  1479.              1) return code from DosQueryMuxWaitSem
  1480.              2) semaphore-id of releaser of muxwait sem (for more info,
  1481.                 see details of DosWaitMuxWaitSem)
  1482.  
  1483.  
  1484. ΓòÉΓòÉΓòÉ 9. Rexx Macro Space Functions ΓòÉΓòÉΓòÉ
  1485.  
  1486. These functions allow Rexx programs to query and alter the Rexx MacroSpace. 
  1487.  
  1488.  
  1489. ΓòÉΓòÉΓòÉ 9.1. RxAddMacro - Add Entry to MacroSpace ΓòÉΓòÉΓòÉ
  1490.  
  1491. This function adds a Rexx program to the macrospace. 
  1492.  
  1493. Syntax:
  1494.  
  1495.   addrc = RxAddMacro(funcname, sourcefile [,order])
  1496.  
  1497. where
  1498.  
  1499.   funcname   = name for function in macrospace
  1500.   sourcefile = name of source file where Rexx source code exists
  1501.   order      = order in macrospace (Before or After)
  1502.  
  1503. Note:
  1504.  
  1505.   Returned value is return code from RexxAddMacro.
  1506.  
  1507.  
  1508. ΓòÉΓòÉΓòÉ 9.2. RxDropMacro - Drop Entry from MacroSpace ΓòÉΓòÉΓòÉ
  1509.  
  1510. This function drops a function from the macrospace. 
  1511.  
  1512. Syntax:
  1513.  
  1514.   droprc = RxDropMacro(funcname)
  1515.  
  1516. where
  1517.  
  1518.   funcname   = name of function in macrospace
  1519.  
  1520. Note:
  1521.  
  1522.   Returned value is return code from RexxDropMacro.
  1523.  
  1524.  
  1525. ΓòÉΓòÉΓòÉ 9.3. RxClearMacroSpace - Clear Entire MacroSpace ΓòÉΓòÉΓòÉ
  1526.  
  1527. This function clears all functions from the macro space.  Be careful when using 
  1528. this as it will affect all processes in the system. 
  1529.  
  1530. Syntax:
  1531.  
  1532.   clear_rc = RxClearMacroSpace()
  1533.  
  1534. Note:
  1535.  
  1536.   Returned value is return code from RexxClearMacroSpace.
  1537.  
  1538.  
  1539. ΓòÉΓòÉΓòÉ 9.4. RxSaveMacroSpace - Save Macro to File ΓòÉΓòÉΓòÉ
  1540.  
  1541. This function saves a macrospace function to a file. 
  1542.  
  1543. Syntax:
  1544.  
  1545.   saverc = RxSaveMacroSpace(funcname, macfile)
  1546.  
  1547. where
  1548.  
  1549.   funcname = name of function in macrospace
  1550.   macfile  = name of file in which to save macro
  1551.  
  1552. Note:
  1553.  
  1554.   Returned value is return code from RexxSaveMacroSpace.
  1555.  
  1556.  
  1557. ΓòÉΓòÉΓòÉ 9.5. RxLoadMacroSpace - Load a Macro from File ΓòÉΓòÉΓòÉ
  1558.  
  1559. This function loads a macrospace function from a file. 
  1560.  
  1561. Syntax:
  1562.  
  1563.   loadrc = RxLoadMacroSpace(funcname, macfile)
  1564.  
  1565. where
  1566.  
  1567.   funcname = name of function in macrospace
  1568.   macfile  = name of file in which to save macro
  1569.  
  1570. Note:
  1571.  
  1572.   Returned value is return code from RexxLoadMacroSpace.
  1573.  
  1574.  
  1575. ΓòÉΓòÉΓòÉ 9.6. RxQueryMacro - Query MacroSpace ΓòÉΓòÉΓòÉ
  1576.  
  1577. This function queries the existence/position of a macro in the macrospace. 
  1578.  
  1579. Syntax:
  1580.  
  1581.   qinfo = RxQueryMacro(funcname)
  1582.  
  1583. where
  1584.  
  1585.   funcname = name of function in macrospace
  1586.   qinfo    = blank-delimited tokens:
  1587.              1) return code from RexxQueryMacro
  1588.                 If #1 is zero, then:
  1589.                 2) Before/After/?
  1590.  
  1591. Note:
  1592.  
  1593.   If first token is not zero, no other information was returned.
  1594.  
  1595.  
  1596. ΓòÉΓòÉΓòÉ 9.7. RxReorderMacro - Reorder Macro Position ΓòÉΓòÉΓòÉ
  1597.  
  1598. This function reorders the position of a macro within the macrospace. 
  1599.  
  1600. Syntax:
  1601.  
  1602.   reorderrc = RxReorderMacro(funcname, position)
  1603.  
  1604. where
  1605.  
  1606.   funcname = name of function in macrospace
  1607.   position = relative position in macrospace (Before/After)
  1608.  
  1609. Note:
  1610.  
  1611.   Returned value is return code from RexxReorderMacro
  1612.  
  1613.  
  1614. ΓòÉΓòÉΓòÉ 10. Threads, Tasking, etc. ΓòÉΓòÉΓòÉ
  1615.  
  1616. These functions allow a Rexx program to start and control new threads and 
  1617. processes. 
  1618.  
  1619.  
  1620. ΓòÉΓòÉΓòÉ 10.1. RxExecPgm - Execute a program ΓòÉΓòÉΓòÉ
  1621.  
  1622. This function starts another program in the same session. 
  1623.  
  1624. Syntax:
  1625.  
  1626.   exrc = RxExecPgm(pgmname [, mode [,argstring]])
  1627.  
  1628. where
  1629.  
  1630.   pgmname   = name of .EXE file to execute
  1631.   mode      = 'S'ync, 'A'sync, async'R'esult, 'T'race, 'B'ackground, 'L'oad,
  1632.               asyncresult'D'b.
  1633.               Default is 'S'ync.
  1634.   argstring = arg string to pass to program
  1635.   exrc      = three blank-delimited tokens:
  1636.               1) return code from DosExecPgm
  1637.               2) termination code / process-id (for asynchronous)
  1638.               3) new program's return code
  1639.  
  1640.  
  1641. ΓòÉΓòÉΓòÉ 10.2. RxStartSession - Start Another Session ΓòÉΓòÉΓòÉ
  1642.  
  1643. This function starts a program in another OS/2 session. 
  1644.  
  1645. Syntax:
  1646.  
  1647.   strc = RxStartSession(pgmname [,args [,related [,fgbg [,title [,type
  1648.                         [,ctrl] ] ] ] ] ])
  1649.  
  1650. where
  1651.  
  1652.   pgmname   = name of .EXE file to execute
  1653.   args      = arg string to pass to program
  1654.   related   = Relation of started session to this session, can be:
  1655.               'I'ndependent or 'C'hild
  1656.   fgbg      = Foreground/Background option, can be:
  1657.               'F'oreground or 'B'ackground
  1658.   title     = Session title (defaults to program name)
  1659.   type      = Program type, can be:
  1660.               'D'efault, 'F'ullscreen, 'P'M, 'V'irtual-Dos,
  1661.               'W'indowed-Virtual-Dos, vi'O'-windowable
  1662.   ctrl      = Program control, can be:
  1663.               'V'isible, 'I'nvisible, ma'X'imized, mi'N'imized,
  1664.               no'A'utoclose
  1665.   strc      = if DosStartSession failed:
  1666.               - return code from DosStartSession followed by error info
  1667.               if DosStartSession got zero rc:
  1668.               - return code from DosStartSession Session-ID Process-ID
  1669.  
  1670.  
  1671. ΓòÉΓòÉΓòÉ 10.3. RxStartRexxSession - Start a Rexx program on another session ΓòÉΓòÉΓòÉ
  1672.  
  1673. This function starts a Rexx program in another OS/2 session. (The program 
  1674. "RXSRS.EXE" must be in your path in order to use this function) 
  1675.  
  1676. Syntax:
  1677.  
  1678.   strc = RxStartRexxSession(execname [,arg1] [,arg2] ... [,argn])
  1679.  
  1680. where
  1681.  
  1682.   execname = name of Rexx program to execute
  1683.                    or
  1684.              a '$' immediately preceding a source program string
  1685.                    or
  1686.              a '&' immediately preceding a tokenized program string
  1687.              (for more info about these, see "RxCallInStore" and
  1688.               "RxTokenize")
  1689.   arg1     = arguments 1-n for target Rexx program
  1690.   ...
  1691.   argn
  1692.   strc     = if DosStartSession failed:
  1693.              - return code from DosStartSession followed by error info
  1694.              if DosStartSession worked:
  1695.              - return code from DosStartSession Session-ID Process-ID
  1696.  
  1697.  
  1698. ΓòÉΓòÉΓòÉ 10.4. RxDetachRexxPgm - Detach a Rexx program ΓòÉΓòÉΓòÉ
  1699.  
  1700. This function starts a Rexx program in the detached OS/2 session. (The program 
  1701. "RXSRS.EXE" must be in your path in order to use this function) 
  1702.  
  1703. Syntax:
  1704.  
  1705.   dtrc = RxDetachRexxPgm(execname [,arg1] [,arg2] ... [,argn])
  1706.  
  1707. where
  1708.  
  1709.   execname = name of Rexx program to execute
  1710.                    or
  1711.              a '$' immediately preceding a source program string
  1712.                    or
  1713.              a '&' immediately preceding a tokenized program string
  1714.              (for more info about these, see "RxCallInStore" and
  1715.               "RxTokenize")
  1716.   arg1     = arguments 1-n for target Rexx program
  1717.   ...
  1718.   argn
  1719.   dtrc     = if DosExecPgm failed:
  1720.              - return code from DosExecPgm, followed by error info
  1721.              if DosExecPgm worked:
  1722.              - return code from DosExecPgm "codeTerminate" and "codeResult"
  1723.  
  1724.  
  1725. ΓòÉΓòÉΓòÉ 10.5. RxKillProcess - Kill an OS/2 Process ΓòÉΓòÉΓòÉ
  1726.  
  1727. This function kills an OS/2 process by process-id. 
  1728.  
  1729. Syntax:
  1730.  
  1731.   killrc = RxKillProcess(pid [, action])
  1732.  
  1733. where
  1734.  
  1735.   pid    = process-id (decimal integer)
  1736.   action = 'Process' or 'Tree' (default is 'Process')
  1737.   killrc = return code from DosKillProcess
  1738.  
  1739.  
  1740. ΓòÉΓòÉΓòÉ 10.6. RxCreateThread - Start new thread ΓòÉΓòÉΓòÉ
  1741.  
  1742. This function starts execution at a supplied entry point on a new thread. The 
  1743. entry point is any valid procedure address (e.g. obtained by a call to 
  1744. RxQueryProcAddr, etc.). 
  1745.  
  1746. Syntax:
  1747.  
  1748.   tid = RxCreateThread(procaddr [, dataptr [, linktype [, stacksize
  1749.                                 [, threadflag]]]])
  1750.  
  1751. where
  1752.  
  1753.   procaddr     = Procedure Address
  1754.   dataptr      = pointer to arguments
  1755.   linktype     = 'System' or 'Optlink'
  1756.                  If linktype is 'System', then args 4 and 5 are:
  1757.     stacksize  = stacksize for thread (default is 8192)
  1758.     threadflag = 'Immediate' or 'Suspend'
  1759.   tid          = thread-id of new thread
  1760.  
  1761. Note:
  1762.   Pointer to arguments is optional, but if supplied must be a valid pointer.
  1763.  
  1764.  
  1765. ΓòÉΓòÉΓòÉ 10.7. RxKillThread - Kill a thread ΓòÉΓòÉΓòÉ
  1766.  
  1767. This function kills a thread by thread-id. 
  1768.  
  1769. Syntax:
  1770.  
  1771.   killrc = RxKillThread(tid)
  1772.  
  1773. where
  1774.  
  1775.   tid    = thread-id
  1776.   killrc = return code from DosKillThread
  1777.  
  1778.  
  1779. ΓòÉΓòÉΓòÉ 10.8. RxSetPriority - Set the priority of processes or threads ΓòÉΓòÉΓòÉ
  1780.  
  1781. This function sets the priority of one or more process and/or threads. 
  1782.  
  1783. Syntax:
  1784.  
  1785.   setrc = RxSetPriority(scope,class,delta,id)
  1786.  
  1787. where
  1788.  
  1789.   scope = 'P'rocess (default)
  1790.           t'R'ee
  1791.           'T'hread
  1792.   class = 'N'ochange (default)
  1793.           'I'dletime
  1794.           'R'egular
  1795.           'T'imecritical
  1796.           foreground'S'erver
  1797.   delta = any integer from -31 to +31, or ma'X'imum, or mi'N'imum
  1798.   id    = a Process-Id, Thread-Id, or nothing, depending on value
  1799.           of "scope"
  1800.   setrc = return code from DosSetPriority
  1801.  
  1802.  
  1803. ΓòÉΓòÉΓòÉ 10.9. RxResumeThread - Resume thread execution ΓòÉΓòÉΓòÉ
  1804.  
  1805. This function causes a thread to resume execution 
  1806.  
  1807. Syntax:
  1808.  
  1809.   resrc = RxResumeThread(tid)
  1810.  
  1811. where
  1812.  
  1813.   tid   = thread-id
  1814.   resrc = return code from DosResumeThread
  1815.  
  1816.  
  1817. ΓòÉΓòÉΓòÉ 10.10. RxSuspendThread - Suspend thread execution ΓòÉΓòÉΓòÉ
  1818.  
  1819. This function causes a thread to suspend execution 
  1820.  
  1821. Syntax:
  1822.  
  1823.   susrc = RxSuspendThread(tid)
  1824.  
  1825. where
  1826.  
  1827.   tid   = thread-id
  1828.   susrc = return code from DosSuspendThread
  1829.  
  1830.  
  1831. ΓòÉΓòÉΓòÉ 10.11. RxCreateRexxThread - Rexx on another thread ΓòÉΓòÉΓòÉ
  1832.  
  1833. This function executes a Rexx program on another thread of the same process. 
  1834. The started Rexx program has a separate variable pool, and maintains its own 
  1835. "current Rexx queue", indpendently of the starting Rexx program.  But all other 
  1836. features of multi-threaded applications apply (i.e. shared file handles, etc.) 
  1837.  
  1838. Syntax:
  1839.  
  1840.   tid = RxCreateRexxThread(execname [,arg1 [,arg2 [, ...]]])
  1841.  
  1842. where
  1843.  
  1844.   execname = name of Rexx program to execute
  1845.                    or
  1846.              a '$' immediately preceding a source program string
  1847.                    or
  1848.              a '&' immediately preceding a tokenized program string
  1849.              (for more info about these, see "RxCallInStore" and
  1850.               "RxTokenize")
  1851.   arg1     = arguments to Rexx program (up to 19 possible)
  1852.   arg2
  1853.   ...
  1854.   tid      = Thread-Id of new thread
  1855.  
  1856. Note:
  1857.  
  1858.   Example of executing a program string:
  1859.  
  1860.     crlf = '0d0a'x
  1861.     str = '/* Rexx */'crlf
  1862.     str = str 'Do i=1 To Arg()'crlf
  1863.     str = str '  Say "Arg#"i "= {"arg(i)"}"'crlf
  1864.     str = str 'End'crlf
  1865.     str = str||'1a'x       /* EOF marker */
  1866.     call rxcreaterexxthread '$'str, date(), time()
  1867.  
  1868.  
  1869. ΓòÉΓòÉΓòÉ 11. NETBIOS information ΓòÉΓòÉΓòÉ
  1870.  
  1871. These functions allow a Rexx program to access certain NETBIOS information. 
  1872.  
  1873.  
  1874. ΓòÉΓòÉΓòÉ 11.1. RxNbSessionStatus - NetBios Session Status ΓòÉΓòÉΓòÉ
  1875.  
  1876. This function gets NetBios session status information. 
  1877.  
  1878. Syntax:
  1879.  
  1880.   nbname = 'S$SQLDBSERVR1#DB'
  1881.  
  1882.   nbrc =  RxNbSessionStatus(nbname,'s.','r')
  1883.  
  1884. Note:
  1885.  
  1886.   Return code is from NETBIOS api.  Second argument is name of a Rexx stem
  1887.   variable under which results are returned as such:
  1888.  
  1889.     stem.0 = number of sessions reported on
  1890.       stem.n.1 = Local session number
  1891.       stem.n.2 = Session state
  1892.       stem.n.3 = Local name
  1893.       stem.n.4 = Remote name
  1894.       stem.n.5 = Number of receive commands pending
  1895.       stem.n.6 = Number of send commands pending
  1896.  
  1897.   Third argument may be supplied to have a NETBIOS "Reset" done before and
  1898.   after obtaining session status.
  1899.  
  1900.  
  1901. ΓòÉΓòÉΓòÉ 12. DLL Handling ΓòÉΓòÉΓòÉ
  1902.  
  1903. These functions allow a Rexx program to load and execute procedures with- in 
  1904. DLL's.  Also, certain information about DLL's can be obtained. 
  1905.  
  1906.  
  1907. ΓòÉΓòÉΓòÉ 12.1. RxLoadModule - Load a DLL ΓòÉΓòÉΓòÉ
  1908.  
  1909. This function loads a DLL, returning a module handle (or an error code). 
  1910.  
  1911. Syntax:
  1912.  
  1913.   dosrc = RxLoadModule(rexxvar, dllname)
  1914.  
  1915. where:
  1916.  
  1917.   rexxvar = name of rexx variable in which module handle is returned
  1918.   dllname = name of DLL to load
  1919.   dosrc   = return code from DosLoadModule
  1920.  
  1921.  
  1922. ΓòÉΓòÉΓòÉ 12.2. RxFreeModule - Free a DLL ΓòÉΓòÉΓòÉ
  1923.  
  1924. This function frees the DLL whose module handle is supplied. 
  1925.  
  1926. Syntax:
  1927.  
  1928.   dosrc = RxFreeModule(hmod)
  1929.  
  1930. where:
  1931.  
  1932.   hmod    = module handle
  1933.   dosrc   = return code from DosFreeModule
  1934.  
  1935.  
  1936. ΓòÉΓòÉΓòÉ 12.3. RxQueryModuleName - Get Module Name ΓòÉΓòÉΓòÉ
  1937.  
  1938. This function returns the name of a module, given the module handle. 
  1939.  
  1940. Syntax:
  1941.  
  1942.   dosrc = RxQueryModuleName(rexxvar,hmod)
  1943.  
  1944. where:
  1945.  
  1946.   rexxvar = name of rexx variable in which module name is returned
  1947.   hmod    = module handle of DLL
  1948.   dosrc   = return code from DosQueryModuleName
  1949.  
  1950.  
  1951. ΓòÉΓòÉΓòÉ 12.4. RxQueryModuleHandle - Get Module Handle ΓòÉΓòÉΓòÉ
  1952.  
  1953. This function returns the handle of a module, given the module's name. 
  1954.  
  1955. Syntax:
  1956.  
  1957.   dosrc = RxQueryModuleHandle(rexxvar,modname)
  1958.  
  1959. where:
  1960.  
  1961.   rexxvar = name of rexx variable in which module handle is returned
  1962.   modname = name of DLL
  1963.   dosrc   = return code from DosQueryModuleHandle
  1964.  
  1965.  
  1966. ΓòÉΓòÉΓòÉ 12.5. RxQueryProcType - Query Procedure Type ΓòÉΓòÉΓòÉ
  1967.  
  1968. This function returns the addressing mode (16/32 bit) of a procedure of a DLL. 
  1969. The procedure can be identified either by name, or ordinal number. 
  1970.  
  1971. Syntax:
  1972.  
  1973.   entryname = 'SQLEXEC'
  1974.   ordinal = 3
  1975.  
  1976.   procinfo = RxQueryProcType(hmod,procid)
  1977.   amode = RxQueryProcType(hmod,entryname)
  1978.  
  1979. where:
  1980.  
  1981.   hmod     = module handle
  1982.   procid   = procedure-id (either an ordinal, or a procedure name)
  1983.   procinfo = Two blank-delimited tokens:
  1984.              1) return code from DosQueryProcType
  1985.              2) either "16" or "32", indicating 16 or 32 bit
  1986.  
  1987.  
  1988. ΓòÉΓòÉΓòÉ 12.6. RxQueryProcAddr - Query Procedure Address ΓòÉΓòÉΓòÉ
  1989.  
  1990. This function returns the address of an entry point in a DLL.  This entry point 
  1991. can then be used in RxCallEntryPoint to call an entry point in a Loaded DLL. 
  1992.  
  1993. Syntax:
  1994.  
  1995.   entryname = 'SQLEXEC' /* Entry name */
  1996.               3         /* Entry ordinal */
  1997.  
  1998.   dosrc = RxQueryProcAddr(rexxvar,hmod,procid)
  1999.  
  2000. where:
  2001.  
  2002.   rexxvar = name of rexx variable in which procedure address is returned
  2003.   hmod    = module handle of DLL
  2004.   procid  = procedure-id (either an ordinal, or a procedure name)
  2005.  
  2006.  
  2007. ΓòÉΓòÉΓòÉ 12.7. RxCallEntryPoint - Call an entry point ΓòÉΓòÉΓòÉ
  2008.  
  2009. This function "calls" the code which begins at the ProcAddress supplied. This 
  2010. ProcAddress could be the address obtained by RxQueryProcAddr for the entry 
  2011. point of a DLL.  But, it can be any "legal" entry point address of any routine. 
  2012.  
  2013. Syntax:
  2014.  
  2015.   procrc = RxCallEntryPoint(procaddr [,arg1 [, arg2 [,...]]] )
  2016.  
  2017. where
  2018.  
  2019.   procaddr = proc-address (could be obtained from RxQueryProcAddr, etc.)
  2020.   parg1
  2021.   ...
  2022.   parg19   = up to 19 arguments.  If an argument is a valid pointer, the
  2023.              pointer will be passed.  If not, a copy of the argument's value
  2024.              will be passed by reference.  Either way, the procedure must be
  2025.              expecting a pointer for each argument.
  2026.   procrc   = return code from the procedure
  2027.  
  2028. Note:
  2029.   Linkage to the proc-address is type _System.
  2030.  
  2031.  
  2032. ΓòÉΓòÉΓòÉ 13. OS/2 Pipes ΓòÉΓòÉΓòÉ
  2033.  
  2034. An assortment of OS/2 pipe-related functions (not complete). 
  2035.  
  2036.  
  2037. ΓòÉΓòÉΓòÉ 13.1. RxCreateNPipe - Create a named pipe ΓòÉΓòÉΓòÉ
  2038.  
  2039. This function creates an OS/2 named pipe. 
  2040.  
  2041. Syntax:
  2042.  
  2043.   dosrc = RxCreateNPipe( rexxvar, pipename, openmode, pipemode,
  2044.                          instance_count, outbufsize, inbufsize,
  2045.                          timeout)
  2046.  
  2047. where
  2048.  
  2049.    rexxvar  = name of Rexx variable into which read/write handle is placed
  2050.    pipename = name of pipe
  2051.  
  2052.    OpenMode Values
  2053.      W    = WriteBehind
  2054.      w    = NoWriteBehind
  2055.      I    = Inherit
  2056.      i    = NoInherit
  2057.      N(n) = Access Inbound
  2058.      O(o) = Access Outbound
  2059.      D(d) = Access Duplex
  2060.  
  2061.    PipeMode Values
  2062.      W    = Wait
  2063.      w    = NoWait
  2064.      T    = Pipe Type "Byte"
  2065.      t    = Pipe Type "Message"
  2066.      R    = Readmode "Byte"
  2067.      r    = Readmode "Message"
  2068.  
  2069.    Instance_Count
  2070.      Integer
  2071.  
  2072.    Outbuf Size
  2073.      Integer
  2074.  
  2075.    Inbuf Size
  2076.      Integer
  2077.  
  2078.    Timeout
  2079.      Integer
  2080.  
  2081.   dosrc   = return code from DosCreateNPipe()
  2082.  
  2083.  
  2084. ΓòÉΓòÉΓòÉ 13.2. RxConnectNPipe - Connect to a named pipe ΓòÉΓòÉΓòÉ
  2085.  
  2086. This function connects to a named pipe 
  2087.  
  2088. Syntax:
  2089.  
  2090.   dosrc = RxConnectNPipe(hpipe)
  2091.  
  2092. where
  2093.  
  2094.    hpipe  = pipe handle
  2095.    dosrc  = return code from DosConnectNPipe()
  2096.  
  2097.  
  2098. ΓòÉΓòÉΓòÉ 13.3. RxDisConnectNPipe - Disconnect from a named pipe ΓòÉΓòÉΓòÉ
  2099.  
  2100. This function disconnects from a named pipe 
  2101.  
  2102. Syntax:
  2103.  
  2104.   dosrc = RxDisConnectNPipe(hpipe)
  2105.  
  2106. where
  2107.  
  2108.    hpipe  = pipe handle
  2109.    dosrc  = return code from DosDisConnectNPipe()
  2110.  
  2111.  
  2112. ΓòÉΓòÉΓòÉ 13.4. RxCreatePipe - Create an un-named pipe ΓòÉΓòÉΓòÉ
  2113.  
  2114. This function creates an OS/2 un-named pipe 
  2115.  
  2116. Syntax:
  2117.  
  2118.   dosrc = RxCreatePipe(rexxstem [,pipesize])
  2119.  
  2120. where
  2121.  
  2122.    rexxstem = name of Rexx stem variable under which read handle,
  2123.               write handle, and pipe size are returned as such:
  2124.               stem.1 = read handle
  2125.               stem.2 = write handle
  2126.               stem.3 = pipe size
  2127.    dosrc  = return code from DosCreatePipe()
  2128.  
  2129.  
  2130. ΓòÉΓòÉΓòÉ 13.5. RxDestroyPipe - Destroy an un-named pipe ΓòÉΓòÉΓòÉ
  2131.  
  2132. This function destroys an OS/2 un-named pipe 
  2133.  
  2134. Syntax:
  2135.  
  2136.   dosrc = RxDestroyPipe(hread,hwrite)
  2137.  
  2138. where
  2139.  
  2140.    hread  = read handle
  2141.    hwrite = write handle
  2142.    dosrc  = return codes from DosClose()
  2143.  
  2144.  
  2145. ΓòÉΓòÉΓòÉ 14. OS/2 Queues ΓòÉΓòÉΓòÉ
  2146.  
  2147. Most of the OS/2 queue APIs are implemented here. 
  2148.  
  2149.  
  2150. ΓòÉΓòÉΓòÉ 14.1. RxCreateQueue - Create an OS/2 queue. ΓòÉΓòÉΓòÉ
  2151.  
  2152. This function creates an OS/2 queue. 
  2153.  
  2154. Syntax:
  2155.  
  2156.   dosrc = RxCreateQueue(rexxvar, qname, qflags)
  2157.  
  2158. where
  2159.  
  2160.    rexxvar  = name of Rexx variable into which queue handle is placed
  2161.    qname    = name of OS/2 queue
  2162.    qflags   = flags for queue creation:
  2163.               F - Fifo
  2164.               L - Lifo
  2165.               P - Priority
  2166.               C - Convert Address
  2167.               N - No-convert Address
  2168.   dosrc   = return code from DosCreateQueue()
  2169.  
  2170.  
  2171. ΓòÉΓòÉΓòÉ 14.2. RxOpenQueue - Open an OS/2 queue ΓòÉΓòÉΓòÉ
  2172.  
  2173. This function opens an OS/2 queue 
  2174.  
  2175. Syntax:
  2176.  
  2177.   dosrc = RxOpenQueue(rexxstem,qname)
  2178.  
  2179. where
  2180.  
  2181.    rexxstem = name of Rexx stem, under which info is returned:
  2182.               stem.1 = queue-owner-pid (integer)
  2183.               stem.2 = queue handle
  2184.    qname    = name of queue to open
  2185.    dosrc    = return code from DosOpenQueue()
  2186.  
  2187.  
  2188. ΓòÉΓòÉΓòÉ 14.3. RxPeekQueue - Peek at an OS/2 queue ΓòÉΓòÉΓòÉ
  2189.  
  2190. This function peeks at an OS/2 queue without reading it 
  2191.  
  2192. Syntax:
  2193.  
  2194.   dosrc = RxPeekQueue(rexxstem,qhandle,elemcode,waitcode,semhandle)
  2195.  
  2196. where
  2197.  
  2198.    rexxstem  = name of Rexx stem, under which info is returned:
  2199.                stem.1 = data pointer (e.g. for use with RxStorage)
  2200.                stem.2 = data length (of that pointed to by stem.1)
  2201.                stem.3 = PID of process which enqueued element
  2202.                stem.4 = event code (RequestData.ulData)
  2203.                stem.5 = element code
  2204.                stem.6 = element priority
  2205.    qhandle   = handle to queue
  2206.    elemcode  = element code (integer)
  2207.    waitcode  = whether to wait for data in queue
  2208.                W = Wait
  2209.                N = Nowait
  2210.    semhandle = handle of semaphore
  2211.    dosrc     = return code from DosPeekQueue()
  2212.  
  2213.  
  2214. ΓòÉΓòÉΓòÉ 14.4. RxReadQueue - Read an OS/2 queue ΓòÉΓòÉΓòÉ
  2215.  
  2216. This function reads an element off an OS/2 
  2217.  
  2218. Syntax:
  2219.  
  2220.   dosrc = RxReadQueue(rexxstem,qhandle,elemcode,waitcode,semhandle)
  2221.  
  2222. where
  2223.  
  2224.    rexxstem  = name of Rexx stem, under which info is returned:
  2225.                stem.1 = data pointer (e.g. for use with RxStorage)
  2226.                stem.2 = data length (of that pointed to by stem.1)
  2227.                stem.3 = PID of process which enqueued element
  2228.                stem.4 = event code (RequestData.ulData)
  2229.                stem.5 = element priority
  2230.    qhandle   = handle to queue
  2231.    elemcode  = element code (integer)
  2232.    waitcode  = whether to wait for data in queue
  2233.                W = Wait
  2234.                N = Nowait
  2235.    semhandle = handle of semaphore
  2236.    dosrc     = return code from DosReadQueue()
  2237.  
  2238.  
  2239. ΓòÉΓòÉΓòÉ 14.5. RxWriteQueue - Write to an OS/2 queue ΓòÉΓòÉΓòÉ
  2240.  
  2241. This function writes an element to an OS/2 
  2242.  
  2243. Syntax:
  2244.  
  2245.   dosrc = RxWriteQueue(qhandle,pointer,length,reqdata,elemprty)
  2246.  
  2247. where
  2248.  
  2249.    qhandle   = handle to queue
  2250.    pointer   = whatever 32 bits you want to put on queue
  2251.    length    = integer length associated with "pointer"
  2252.    reqdata   = integer request data
  2253.    elemprtry = element priority, if this is a priority queue
  2254.    dosrc     = return code from DosWriteQueue()
  2255.  
  2256.  
  2257. ΓòÉΓòÉΓòÉ 14.6. RxPurgeQueue - Purge elements from OS/2 queue ΓòÉΓòÉΓòÉ
  2258.  
  2259. This function purges elements from an OS/2 queue 
  2260.  
  2261. Syntax:
  2262.  
  2263.   dosrc = RxPurgeQueue(qhandle)
  2264.  
  2265. where
  2266.  
  2267.    qhandle   = handle to queue
  2268.    dosrc     = return code from DosPurgeQueue()
  2269.  
  2270.  
  2271. ΓòÉΓòÉΓòÉ 14.7. RxQueryQueue - Query info about OS/2 queue ΓòÉΓòÉΓòÉ
  2272.  
  2273. This function returns information about an OS/2 queue 
  2274.  
  2275. Syntax:
  2276.  
  2277.   info = RxQueryQueue(qhandle)
  2278.  
  2279. where
  2280.  
  2281.    qhandle   = handle to queue
  2282.    info      = two blank delimited tokens:
  2283.                1) return code from DosQueryQueue()
  2284.                2) number of elements on queue (if (1) is zero)
  2285.  
  2286.  
  2287. ΓòÉΓòÉΓòÉ 14.8. RxCloseQueue - Close an OS/2 queue ΓòÉΓòÉΓòÉ
  2288.  
  2289. This function closes an OS/2 queue 
  2290.  
  2291. Syntax:
  2292.  
  2293.   dosrc = RxCloseQueue(qhandle)
  2294.  
  2295. where
  2296.  
  2297.    qhandle   = handle to queue
  2298.    dosrc     = return code from DosCloseQueue()
  2299.  
  2300.  
  2301. ΓòÉΓòÉΓòÉ 14.9. RxReadQueueStr - Read data from OS/2 queue ΓòÉΓòÉΓòÉ
  2302.  
  2303. This function returns the de-referenced contents of an OS/2 queue element. 
  2304. That is, it dequeues an element and returns the data pointed to by the dequeued 
  2305. element as the function result.  It first does a DosOpenQueue, then a 
  2306. DosReadQueue(wait), but does NOT do a DosCloseQueue. 
  2307.  
  2308. Syntax:
  2309.  
  2310.   datastr = RxReadQueueStr(qname)
  2311.  
  2312. where
  2313.  
  2314.    qname     = name of queue to read
  2315.    datastr   = data pointed to by dequeued pointer
  2316.  
  2317.  
  2318. ΓòÉΓòÉΓòÉ 15. I/O Related ΓòÉΓòÉΓòÉ
  2319.  
  2320. Miscellaneous functions related to I/O operations. 
  2321.  
  2322.  
  2323. ΓòÉΓòÉΓòÉ 15.1. RxOpen - Open a file ΓòÉΓòÉΓòÉ
  2324.  
  2325. This function opens a file. 
  2326.  
  2327. Syntax:
  2328.  
  2329.   dosrc = RxOpen(rexxstem, filename, openflag, openmode [,attr] [,size])
  2330.  
  2331. where
  2332.  
  2333.   rexxstem  = name of Rexx stem variable under which info is returned:
  2334.               stem.1 = file handle
  2335.               stem.2 = action taken:
  2336.                        Existed
  2337.                        Created
  2338.                        Truncated
  2339.   filename  = name of file/pipe/stream to open
  2340.   openflag  = flag indicating what to do if file exists:
  2341.               (case does not matter)
  2342.               N - fail if New
  2343.               C - Create if new
  2344.               E - fail if Exists
  2345.               O - Open if exists
  2346.               R - Replace if exists
  2347.   openmode  = how to open file, valid combinations of:
  2348.               (case DOES matter)
  2349.               D - Dasd
  2350.               T - write Through
  2351.               F - Fail on error
  2352.               C - no Cache
  2353.               S - Sequential
  2354.               R - Random
  2355.               M - random/sequential (Mixed)
  2356.               H - no inHerit
  2357.               b - (sharemode) deny read/write (both)
  2358.               w - (sharemode) deny write
  2359.               r - (sharemode) deny read
  2360.               n - (sharemode) deny none
  2361.               R - (accessmode) Read only
  2362.               W - (accessmode) Write only
  2363.               B - (accessmode) readwrite (Both)
  2364.   attr      = file attribute, valid combinations of:
  2365.               (only if open creates file)
  2366.               A - Archived
  2367.               D - Directory
  2368.               S - System
  2369.               H - Hidden
  2370.               R - Readonly
  2371.               N - Normal (default)
  2372.   size      = file size (only if open creates file)
  2373.   dosrc     = return code from DosOpen()
  2374.  
  2375.  
  2376. ΓòÉΓòÉΓòÉ 15.2. RxRead - Read from File Handle ΓòÉΓòÉΓòÉ
  2377.  
  2378. This function reads a character stream in from a file handle, rather than from 
  2379. a file name. 
  2380.  
  2381. Syntax:
  2382.  
  2383.   dosrc = RxRead( rexxvar, hfile [,length] )
  2384.  
  2385. where
  2386.  
  2387.   rexxvar = name of Rexx variable into which read data is placed
  2388.   hfile   = handle of file to be read from
  2389.   length  = number of bytes to read (defaults to zero)
  2390.   dosrc   = two blank-delimited words:
  2391.             1) return code from DosRead
  2392.             2) if (1) is zero, an integer indicating number of bytes
  2393.                read (should be same as length of rexx variable's
  2394.                value)
  2395.  
  2396.  
  2397. ΓòÉΓòÉΓòÉ 15.3. RxWrite - Write to File Handle ΓòÉΓòÉΓòÉ
  2398.  
  2399. This function writes a character stream out to a file handle, rather than from 
  2400. a file name. 
  2401.  
  2402. Syntax:
  2403.  
  2404.   dosrc = RxWrite( hfile , data )
  2405.  
  2406. where
  2407.  
  2408.   hfile = handle of file to be written to
  2409.   data  = data to be written to file
  2410.   dosrc   = two blank-delimited words:
  2411.             1) return code from DosWrite
  2412.             2) if (1) is zero, an integer indicating number of bytes
  2413.                written (may not be same as length of data supplied)
  2414.  
  2415.  
  2416. ΓòÉΓòÉΓòÉ 15.4. RxCloseH - Close a File Handle ΓòÉΓòÉΓòÉ
  2417.  
  2418. This function closes a file handle. 
  2419.  
  2420. Syntax:
  2421.  
  2422.   closerc = RxCloseH(hfile)
  2423.  
  2424. where
  2425.  
  2426.   hfile   = handle of file to be closed
  2427.   closerc = return code from DosClose
  2428.  
  2429.  
  2430. ΓòÉΓòÉΓòÉ 15.5. RxExecI - Read data into a Rexx queue or stem from a file ΓòÉΓòÉΓòÉ
  2431.  
  2432. This function reads (text) data into a Rexx queue or stem variable from a file. 
  2433. It is meant to be like EXECIO in TSO and VM, and can be used in a similar 
  2434. fashion for file input. 
  2435.  
  2436. Syntax:
  2437.  
  2438.   info = RxExecI([fname], [qtype], [name], [type])
  2439.  
  2440. where:
  2441.  
  2442.   fname  = name of file to be read from (default reads from stdin)
  2443.   qtype  = 'Lifo' or 'Fifo' (default is 'Fifo')
  2444.            determines how lines are read onto queue
  2445.            (ignored for stems)
  2446.   name   = name of Rexx queue from into which data is read (default uses
  2447.            current queue)
  2448.                or
  2449.            name of a Rexx stem variable under which data is to be mapped as
  2450.              stem.0 = number of lines (stem.1 - stem.n)
  2451.              stem.1
  2452.              stem.2
  2453.              ...
  2454.              stem.n
  2455.   type   = 'Queue' or 'Stem' (default is 'Queue')
  2456.            this tells whether arg 3 is a Rexx Queue name or a stem
  2457.            variable name
  2458.   info   = two blank delimited numbers:
  2459.            1) number of lines read
  2460.            2) total number of bytes read
  2461.  
  2462. Example:
  2463.  
  2464.   /* Read a text file into the Rexx stem 's.' */
  2465.   info = rxexeci('c:\config.sys',,'s.','s')
  2466.   parse var info lines bytes
  2467.   Say lines 'lines were read'
  2468.   Say bytes 'bytes were read'
  2469.  
  2470.  
  2471. ΓòÉΓòÉΓòÉ 15.6. RxExecO - Write data from a Rexx queue or stem to a file ΓòÉΓòÉΓòÉ
  2472.  
  2473. This function writes data from a Rexx queue or stem variable to a file.  It is 
  2474. meant to be like EXECIO in TSO and VM, and can be used in a similar fashion for 
  2475. file output. 
  2476.  
  2477. Syntax:
  2478.  
  2479.   info = RxExecO([fname], [action], [name], [type])
  2480.  
  2481. where:
  2482.  
  2483.   fname  = name of file to be written to (default sends to stdout)
  2484.   action = Replace or Append (default is 'Replace')
  2485.            replaces or appends to 'fname'
  2486.   name   = name of Rexx queue from which to get data (default uses
  2487.            current queue)
  2488.                or
  2489.            name of a Rexx stem variable under which data is mapped as
  2490.              stem.1
  2491.              stem.2
  2492.              ...
  2493.              stem.n
  2494.            Once an uninitialized value for 'stem.n' is encountered,
  2495.            i/o stops.
  2496.   type   = 'Queue' or 'Stem' (default is 'Queue')
  2497.            this tells whether arg 3 is a Rexx Queue name or a stem
  2498.            variable name
  2499.   info   = two blank delimited numbers:
  2500.            1) number of lines written
  2501.            2) total number of bytes written
  2502.  
  2503. Example:
  2504.  
  2505.   /* Write 100 lines from current queue to c:\junk.dat (replace file) */
  2506.   Do 100
  2507.     Queue i time('l')
  2508.   End
  2509.   info = rxexeco('c:\junk.dat','r')
  2510.   parse var info lines bytes
  2511.   Say lines 'lines were written'
  2512.   Say bytes 'bytes were written'
  2513.  
  2514.  
  2515. ΓòÉΓòÉΓòÉ 15.7. RxVioPopUp - Start a VioPopUp display screen ΓòÉΓòÉΓòÉ
  2516.  
  2517. This function starts a VioPopUp display screen. 
  2518.  
  2519. Syntax:
  2520.  
  2521.   viorc = RxVioPopUp(wait,opaque)
  2522.  
  2523. where:
  2524.  
  2525.   wait   = Wait   - wait if a pop-up screen already exists
  2526.          = Nowait - return with error if a pop-up screen already exists
  2527.   opaque = Opaque or Transparent
  2528.   viorc  = return code from VioPopUp()
  2529.  
  2530.  
  2531. ΓòÉΓòÉΓòÉ 15.8. RxVioEndPopUp - Close a VioPopUp display screen ΓòÉΓòÉΓòÉ
  2532.  
  2533. This function closes a VioPopUp display screen. 
  2534.  
  2535. Syntax:
  2536.  
  2537.   viorc = RxVioEndPopUp()
  2538.  
  2539. where:
  2540.  
  2541.   viorc  = return code from VioEndPopUp()
  2542.  
  2543.  
  2544. ΓòÉΓòÉΓòÉ 15.9. RxVioWrtCharStrAtt - Write characters to a VioPopUp display screen ΓòÉΓòÉΓòÉ
  2545.  
  2546. This function writes characters to a VioPopUp display screen. 
  2547.  
  2548. Syntax:
  2549.  
  2550.   viorc = RxWrtCharStrAtt(string,rowx,coly,attr)
  2551.  
  2552. where:
  2553.  
  2554.   string = data to write
  2555.   rowx   = row number
  2556.   coly   = column number
  2557.   attr   = attribute bit string
  2558.   viorc  = return code from VioWrtCharStrAtt()
  2559.  
  2560.  
  2561. ΓòÉΓòÉΓòÉ 15.10. RxKbCharIn - Get a character from a VioPopUp display screen ΓòÉΓòÉΓòÉ
  2562.  
  2563. This function gets a character from a VioPopUp display screen 
  2564.  
  2565. Syntax:
  2566.  
  2567.   info = RxKbdCharIn(wait)
  2568.  
  2569. where:
  2570.  
  2571.   wait   = Wait   - wait for character
  2572.            Nowait - no wait for character
  2573.   info   = return code from KbdCharIn(), and, if zero, followed by these
  2574.            blank delimited values:
  2575.            1) Character
  2576.            2) Scan Code (hex)
  2577.            3) NLS state (hex)
  2578.            4) NLS shift (hex)
  2579.            5) Shift Key state (hex)
  2580.            6) Millisecond timestamp of keystroke
  2581.  
  2582.  
  2583. ΓòÉΓòÉΓòÉ 15.11. Rxrsoe2f - Redirect Std-Out/Err to File ΓòÉΓòÉΓòÉ
  2584.  
  2585. This function redirects Standard Out and Standard Error to a named file (or 
  2586. device name, such as "CON"). 
  2587.  
  2588. Syntax:
  2589.  
  2590.   Call Rxrsoe2f stream,opt
  2591.  
  2592. where:
  2593.  
  2594.   stream = name of file or device (e.g. 'con', 'nul', 'kbd', etc.)
  2595.            to which standard-out and standard-error are re-directed.
  2596.   opt    = either 'Append' or 'Replace' file/device
  2597.  
  2598.  
  2599. ΓòÉΓòÉΓòÉ 15.12. RxDupHandle - Do a "DosDupHandle()" ΓòÉΓòÉΓòÉ
  2600.  
  2601. This function allows you to do a "DosDupHandle()" 
  2602.  
  2603. Syntax:
  2604.  
  2605.   dosrc = RxDupHandle(rexxvar,hfile1,hfile2)
  2606.  
  2607. where:
  2608.  
  2609.   rexxvar = name of Rexx variable in which is return duplicated handle
  2610.             (value returned in arg2 by DosDupHandle)
  2611.   hfile1  = arg1 to DosDupHandle
  2612.   hfile2  = arg2 to DosDupHandle
  2613.   dosrc   = return code from DosDupHandle()
  2614.  
  2615.  
  2616. ΓòÉΓòÉΓòÉ 15.13. RxSetFHState - Set file handle state ΓòÉΓòÉΓòÉ
  2617.  
  2618. This function allows you to set a file handle's state 
  2619.  
  2620. Syntax:
  2621.  
  2622.   dosrc = RxSetFHState(hfile,flags)
  2623.  
  2624. where:
  2625.  
  2626.   hfile  = file handle whose state you want to set
  2627.   flags  = valid combinations of:
  2628.            (case DOES matter)
  2629.            D - Dasd
  2630.            T - write Through
  2631.            F - Fail on error
  2632.            C - no Cache
  2633.            S - Sequential
  2634.            R - Random
  2635.            M - random/sequential (Mixed)
  2636.            H - no inHerit
  2637.            b - (sharemode) deny read/write (both)
  2638.            w - (sharemode) deny write
  2639.            r - (sharemode) deny read
  2640.            n - (sharemode) deny none
  2641.            R - (accessmode) Read only
  2642.            W - (accessmode) Write only
  2643.            B - (accessmode) readwrite (Both)
  2644.   dosrc  = return code from DosSetFHState()
  2645.  
  2646.  
  2647. ΓòÉΓòÉΓòÉ 15.14. RxQueryFHState - Query file handle state ΓòÉΓòÉΓòÉ
  2648.  
  2649. This function allows you to query a file handle's state 
  2650.  
  2651. Syntax:
  2652.  
  2653.   info = RxQueryFHState(hfile)
  2654.  
  2655. where:
  2656.  
  2657.   hfile  = file handle whose state you want to query
  2658.   info   = two blank delimited tokens:
  2659.            1) return code from DosSetFHState(),
  2660.            2) if (1) is zero, then a string of flags indicating state
  2661.               of file, flag values are (case is important):
  2662.               D - OPEN_FLAGS_DASD
  2663.               T - OPEN_FLAGS_WRITE_THROUGH
  2664.               F - OPEN_FLAGS_FAIL_ON_ERROR
  2665.               C - OPEN_FLAGS_NO_CACHE
  2666.               H - OPEN_FLAGS_NOINHERIT
  2667.               b - OPEN_SHARE_DENYREADWRITE
  2668.               w - OPEN_SHARE_DENYWRITE
  2669.               r - OPEN_SHARE_DENYREAD
  2670.               n - OPEN_SHARE_DENYNONE
  2671.               R - OPEN_ACCESS_READONLY
  2672.               W - OPEN_ACCESS_WRITEONLY
  2673.               B - OPEN_ACCESS_READWRITE
  2674.  
  2675.  
  2676. ΓòÉΓòÉΓòÉ 16. System-Info related ΓòÉΓòÉΓòÉ
  2677.  
  2678. Functions returning OS/2 system information. 
  2679.  
  2680.  
  2681. ΓòÉΓòÉΓòÉ 16.1. RxQProcstatus - Get Process Status Information ΓòÉΓòÉΓòÉ
  2682.  
  2683. This function returns process status information (like PSTAT).  In this version 
  2684. of YDBAUTIL (v1.5), Library and Shared-Memory information is stored differently 
  2685. than in the previous release (v1.4). In the previous version, if you wanted the 
  2686. name of a module used by a process, for instance, you would have to search 
  2687. through the Library array to match the module index value "stem.0p.n.0l.m", to 
  2688. get the module name "stem.0l.n.2".  In this version, you simply get the module 
  2689. name by indexing into the Library array using the index value in 
  2690. "stem.0p.n.0l.m". 
  2691.  
  2692.  
  2693. Syntax:
  2694.  
  2695.   dosrc = RxQProcStatus(stemname [,flags])
  2696.  
  2697. where:
  2698.  
  2699.   stemname = a Rexx stem variable name under which results are
  2700.              mapped as such:
  2701.  
  2702.                // System Global Information
  2703.                stem.0G.1 = total number of threads in system
  2704.                stem.0G.2 = undocumented value 1
  2705.                stem.0G.3 = undocumented value 2
  2706.  
  2707.                // Process Information
  2708.                stem.0P.0 = number of processes
  2709.                stem.0P.n.1 = process-id (hex)
  2710.                stem.0P.n.2 = parent process-id (hex)
  2711.                stem.0P.n.3 = process type (hex)
  2712.                stem.0P.n.4 = process status (hex, followed by blank, followed
  2713.                              by text description)
  2714.                stem.0P.n.5 = process screen-group/session-id (hex)
  2715.                stem.0P.n.6 = process module name (value of "SYSINIT" may
  2716.                              indicate a DOS "process")
  2717.                stem.0P.n.0S.0 = number of 16-bit semaphores used by process
  2718.                stem.0P.n.0S.n = 16-bit semaphore index value (use to "hash"
  2719.                                 into list of "stem.0S.n.1" values)
  2720.                stem.0P.n.0L.0 = number of libraries statically linked by process
  2721.                stem.0P.n.0L.n = linked library index value (use to "hash"
  2722.                                 into list of "stem.0L.index" values)
  2723.                stem.0P.n.0M.0 = number of shared memory objects used by process
  2724.                stem.0P.n.0M.n = shared memory index value (use to "hash"
  2725.                                 into list of "stem.0M.index" values)
  2726.                stem.0P.n.0T.0 = number of threads in this process
  2727.                stem.0P.n.0T.m.1 = thread-id within process (hex)
  2728.                stem.0P.n.0T.m.2 = unique thread slot number (hex, system wide)
  2729.                stem.0P.n.0T.m.3 = sleep-id thread is sleeping on (hex)
  2730.                stem.0P.n.0T.m.4 = thread priority (hex)
  2731.                stem.0P.n.0T.m.5 = system time
  2732.                stem.0P.n.0T.m.6 = user time
  2733.                stem.0P.n.0T.m.7 = thread state (hex followed by text string)
  2734.  
  2735.                // 16-Bit Semaphore Information
  2736.                stem.0S.0 = number of 16-bit semaphore records
  2737.                stem.0S.0.1 = index of first semaphore (hex)
  2738.                stem.0S.n.1 = semaphore index (hex, hash into using "stem.0P.n.0S.n")
  2739.                stem.0S.n.2 = owning slot-id (hex)
  2740.                stem.0S.n.3 = semaphore flag
  2741.                stem.0S.n.4 = reference count
  2742.                stem.0S.n.5 = request count
  2743.                stem.0S.n.6 = semaphore name
  2744.  
  2745.                // Shared Memory Object Information
  2746.                stem.0M.0 = number of shared memory objects
  2747.                stem.0M.n = memory handle (hex, hash into using "stem.0P.n.0M.n")
  2748.                stem.0M.index.1 = memory selector (hex)
  2749.                stem.0M.index.2 = reference count
  2750.                stem.0M.index.3 = memory name
  2751.  
  2752.                // Statically Linked Library Information
  2753.                stem.0L.0 = number of statically linked libraries/modules
  2754.                stem.0L.n = module handle (hex, hash into using "stem.0P.n.0L.n")
  2755.                stem.0L.index.1 = library name
  2756.                stem.0L.index.0I.0 = number of imported modules
  2757.                stem.0L.index.0I.n = imported module handle (hex, use to "hash"
  2758.                                     into list of "stem.0L.index" values)
  2759.  
  2760.   flags    = flags indicating what kind of information to return, may be
  2761.              any combination of:
  2762.                M - shared memory information
  2763.                S - 16-bit semaphore information
  2764.                L - linked library information
  2765.  
  2766.   dosrc    = return code from DosQProcStatus()
  2767.  
  2768. Example:
  2769.  
  2770.   /* rexx */
  2771.   /* Find out what modules each process has statically linked (1st level) */
  2772.  
  2773.   dosrc = rxqprocstatus('q.','l')
  2774.  
  2775.   Say 'There are' q.0p.0 'processes ('q.0g.1 'threads) running right now'
  2776.   do j=1 to q.0p.0
  2777.     say;say 'Process ('q.0p.j.1')'q.0p.j.6 'statically links the following libraries:'
  2778.     do r=1 to q.0p.j.0l.0
  2779.       idx = q.0p.j.0l.r
  2780.       say '   ' q.0l.idx.1
  2781.     end
  2782.   end
  2783.  
  2784.   exit
  2785.  
  2786. Note:
  2787.  
  2788.   Process/Thread information is always returned, whether or not semaphore,
  2789.   library or shared-memory information is requested.
  2790.  
  2791.   The reason such odd compound variable index values were chosen (such as "0P",
  2792.   "0S", etc.) is because too long a constant index value (such as "PROC")
  2793.   tended to increase processing time for the function call (actual size of
  2794.   variable name pool is larger).  The alternative, to use brief constant index
  2795.   values (such as "M") turned out to cause problems when I happened to be using
  2796.   one of these for a variable.  The solution was to choose a constant index name
  2797.   which begins with a digit ("0" - i.e. zero), which is an invalid variable name,
  2798.   thus ensuring that no variable could have the same name as the constant index.
  2799.   This made relatively brief names (e.g. - "0M") possible and prevents "collision"
  2800.   with variable names your program may be using.
  2801.  
  2802.  
  2803. ΓòÉΓòÉΓòÉ 16.2. RxSetError - Set DosError settings ΓòÉΓòÉΓòÉ
  2804.  
  2805. This function allows you to turn HardError and Exception popup on or off.  This 
  2806. change takes effect for the process in which it is issued, no matter what the 
  2807. previous setting was, by whom, or on what thread. Presently, there is no way 
  2808. (that I know of) to query or "reset" these error settings. 
  2809.  
  2810. Syntax:
  2811.  
  2812.   dosrc = RxSetError(flag)
  2813.  
  2814. where:
  2815.  
  2816.   flag  = any combination of:
  2817.           'h' to disable HardError popup
  2818.           'H' to enable  HardError popup
  2819.           'e' to disable Exception popup
  2820.           'E' to enable  Exception popup
  2821.   dosrc = return code from DosError()
  2822.  
  2823. Example:
  2824.  
  2825.   Call rxseterror 'eh'  /* would suppress popups from both harderror */
  2826.                         /* and exception conditions */
  2827.  
  2828.  
  2829. ΓòÉΓòÉΓòÉ 16.3. RxReplaceModule - Replace an active .DLL or .EXE ΓòÉΓòÉΓòÉ
  2830.  
  2831. This function uses the OS/2 "DosReplaceModule()" API to replace an active .DLL 
  2832. or .EXE (i.e. such a module that is locked because it is currently in use). 
  2833.  
  2834. Syntax:
  2835.  
  2836.   dosrc = RxReplaceModule(oldmodname, newmodname, backupmodname)
  2837.  
  2838. where:
  2839.  
  2840.   oldmodname    = name of locked module
  2841.   newmodname    = name of new module to replace old one
  2842.   backupmodname = name of backup module for recoverability
  2843.   dosrc         = return code from DosReplaceModule()
  2844.  
  2845.  
  2846. ΓòÉΓòÉΓòÉ 16.4. RxExitList - Use DosExitList ΓòÉΓòÉΓòÉ
  2847.  
  2848. This function uses the OS/2 "DosExitList()" API to work with OS/2 Exit-Handlers 
  2849. (i.e. add/remove/exit).  For more information on this function, see the OS/2 
  2850. developer's reference for "DosExitList()". 
  2851.  
  2852. Syntax:
  2853.  
  2854.   dosrc = RxExitList(funcaddr [,action] [,order] )
  2855.  
  2856. where:
  2857.  
  2858.   funcaddr  = function pointer (e.g. obtained by RxQueryProcAddr())
  2859.   action    = Add, Remove, Exit
  2860.   order     = 1 byte value (0x00-0xff) indicating order for "Add"
  2861.   dosrc     = return code from DosExitList()
  2862.  
  2863.  
  2864. ΓòÉΓòÉΓòÉ 16.5. RxProcId - Get process' own PID and TID information ΓòÉΓòÉΓòÉ
  2865.  
  2866. This function returns the process-id, parent process-id, and thread-id of the 
  2867. current thread of the current process. 
  2868.  
  2869. Syntax:
  2870.  
  2871.   procinfo = rxprocid()
  2872.  
  2873. where:
  2874.  
  2875.   procinfo = three blank delimited integers:
  2876.              1) process-id
  2877.              2) parent process-id
  2878.              3) thread-id
  2879.  
  2880.  
  2881. ΓòÉΓòÉΓòÉ 16.6. RxGetInfoBlocks - Get information about current process/thread ΓòÉΓòÉΓòÉ
  2882.  
  2883. This function returns the various pieces of information which the 
  2884. DosGetInfoBlocks() function returns. 
  2885.  
  2886. Syntax:
  2887.  
  2888.   dosrc = RxGetInfoBlocks(rexxstem)
  2889.  
  2890. where:
  2891.  
  2892.   rexxstem = name of rexx stem under which information is returned as
  2893.              such:
  2894.  
  2895.              stem.P.1  = process-id
  2896.              stem.P.2  = parent process-id
  2897.              stem.P.3  = our .EXE's module handle
  2898.              stem.P.4  = pointer to command line string
  2899.              stem.P.5  = pointer to environment string
  2900.              stem.P.6  = process status bits
  2901.              stem.P.7  = process type code
  2902.  
  2903.              stem.T.1  = thread-id
  2904.              stem.T.2  = thread priority
  2905.              stem.T.3  = tib2 version
  2906.              stem.T.4  = MustComplete count
  2907.              stem.T.5  = MustComplete Force Flag
  2908.              stem.T.6  = tib version
  2909.              stem.T.7  = thread ordinal
  2910.              stem.T.8  = pointer to head of exception handler chain
  2911.              stem.T.9  = pointer to base of stack
  2912.              stem.T.10 = pointer to end of stack
  2913.  
  2914.   dosrc    = return code from DosGetInfoBlocks()
  2915.  
  2916. Note:
  2917.  
  2918.   for stem.P.4, stem.P.5, stem.T.9, and stem.T.10, you could use
  2919.   RxStorage() to get to the values at these addresses.
  2920.  
  2921.  
  2922. ΓòÉΓòÉΓòÉ 16.7. RxQueryAppType - Get information about an executable file ΓòÉΓòÉΓòÉ
  2923.  
  2924. This function returns information about the type of an executable file as 
  2925. indicated in that file's header. 
  2926.  
  2927. Syntax:
  2928.  
  2929.   info = RxQueryAppType(filename)
  2930.  
  2931. where:
  2932.  
  2933.   filename = name of executable file whose type you want to know
  2934.              (either fully qualified, or just name and will search
  2935.               path)
  2936.   info     = return code from DosQueryAppType, and if zero, followed
  2937.              by any combination of:
  2938.  
  2939.              N - NotSpecified
  2940.              w - NotWindowCompat
  2941.              W - WindowCompat
  2942.              A - WindowApi
  2943.              B - Bound
  2944.              L - DLL
  2945.              D - DOS
  2946.              Y - Physical Device Driver
  2947.              V - Virtual Device Driver
  2948.              P - Protected Memory DLL
  2949.              3 - 32 Bit
  2950.  
  2951.  
  2952. ΓòÉΓòÉΓòÉ 16.8. RxQuerySysInfo - Query OS/2 SysInfo ΓòÉΓòÉΓòÉ
  2953.  
  2954. This function returns live system information about OS/2 via the 
  2955. DosQuerySysInfo API. 
  2956.  
  2957. Syntax:
  2958.  
  2959.   rc = RxQuerySysInfo( stemname [,startidx [,endidx]])
  2960.  
  2961. where
  2962.  
  2963.   stemname = Rexx stem name, under which results are returned.  Each
  2964.              DosQuerySysInfo item is returned under the appropriate stem.n
  2965.              For instance, the call "call rxquerysysinfo('s.',3,5)" would
  2966.              set the rexx variables "s.3", "s.4", and "s.5".
  2967.   rc       = return code from DosQuerySysInfo()
  2968.   startidx = Default is 1
  2969.   endidx   = Default is 23
  2970.  
  2971.   Index values:
  2972.  
  2973.   1. Maximum length, in bytes, of a path name.
  2974.   2. Maximum number of text sessions.
  2975.   3. Maximum number of PM sessions.
  2976.   4. Maximum number of DOS sessions.
  2977.   5. Drive from which the system was started (1 means drive A,
  2978.      2 means drive B, and so on).
  2979.   6. Dynamic priority variation flag (0 means absolute priority,
  2980.      1 means dynamic priority).
  2981.   7. Maximum wait in seconds.
  2982.   8. Minimum time slice in milliseconds.
  2983.   9. Maximum time slice in milliseconds.
  2984.  10. Memory page size in bytes.  This value is 4096 for the 80386
  2985.      processor.
  2986.  11. Major version number.
  2987.  12. Minor version number.
  2988.  13. Revision letter.
  2989.  14. Value of a 32-bit, free-running millisecond counter.  This value
  2990.      is zero when the system is started.
  2991.  15. Low-order 32 bits of the time in seconds since January 1, 1970
  2992.      at 0:00:00.
  2993.  16. High-order 32 bits of the time in seconds since January 1, 1970
  2994.      at 0:00:00.
  2995.  17. Total number of pages of physical memory in the system.
  2996.      One page is 4KB.
  2997.  18. Total number of pages of resident memory in the system.
  2998.  19. Maximum number of pages of memory that can be allocated by all
  2999.      processes in the system.  This number is advisory and is not
  3000.      guaranteed, since system conditions change constantly.
  3001.  20. Maximum number of bytes of memory that this process can allocate
  3002.      in its private arena.  This number is advisory and is not
  3003.      guaranteed, since system conditions change constantly.
  3004.  21. Maximum number of bytes of memory that a process can allocate in
  3005.      the shared arena.  This number is advisory and is not guaranteed,
  3006.      since system conditions change constantly.
  3007.  22. Timer interval in tenths of a millisecond.
  3008.  23. Maximum length, in bytes, of one component in a path name.
  3009.  
  3010.  
  3011. ΓòÉΓòÉΓòÉ 17. PM / Wp related functions ΓòÉΓòÉΓòÉ
  3012.  
  3013. Functions related to PM or Workplace Shell Objects 
  3014.  
  3015.  
  3016. ΓòÉΓòÉΓòÉ 17.1. RxWinQueryObject - Query WP-Shell Object Handle ΓòÉΓòÉΓòÉ
  3017.  
  3018. This function returns the object handle of a WorkPlace Shell object. 
  3019.  
  3020. Syntax:
  3021.  
  3022.   hobj = RxWinQueryObject(objname)
  3023.  
  3024. where
  3025.  
  3026.   objname = name of WorkPlace Shell object
  3027.   hobj    = handle to object (or null string if not successful)
  3028.  
  3029.  
  3030. ΓòÉΓòÉΓòÉ 17.2. RxWinDestroyObject - Destroy a WP-Shell Object ΓòÉΓòÉΓòÉ
  3031.  
  3032. This function destroys a WorkPlace Shell object by object handle. 
  3033.  
  3034. Syntax:
  3035.  
  3036.   yorn = RxWinDestroyObject(hobj)
  3037.  
  3038. where
  3039.  
  3040.   hobj    = handle to object
  3041.   yorn    = "1" if it worked, "0" if it didn't
  3042.